Loading...
Searching...
No Matches
sceneGlobalsSchema.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
8
9/* ************************************************************************** */
10/* ** ** */
11/* ** This file is generated by a script. ** */
12/* ** ** */
13/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14/* ** Edit hdSchemaDefs.py instead to make changes. ** */
15/* ** ** */
16/* ************************************************************************** */
17
18#ifndef PXR_IMAGING_HD_SCENE_GLOBALS_SCHEMA_H
19#define PXR_IMAGING_HD_SCENE_GLOBALS_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
24
25#include "pxr/imaging/hd/schema.h"
26
27// --(BEGIN CUSTOM CODE: Includes)--
28#include "pxr/usd/sdf/path.h"
29#include "pxr/imaging/hd/sceneIndex.h"
30#include "pxr/imaging/hd/vectorSchema.h"
31// --(END CUSTOM CODE: Includes)--
32
33PXR_NAMESPACE_OPEN_SCOPE
34
35// --(BEGIN CUSTOM CODE: Declares)--
37// --(END CUSTOM CODE: Declares)--
38
39#define HD_SCENE_GLOBALS_SCHEMA_TOKENS \
40 (sceneGlobals) \
41 (primaryCameraPrim) \
42 (activeRenderPassPrim) \
43 (activeRenderSettingsPrim) \
44 (startTimeCode) \
45 (endTimeCode) \
46 (timeCodesPerSecond) \
47 (currentFrame) \
48 (sceneStateId) \
49 (primIdToPath) \
50
51TF_DECLARE_PUBLIC_TOKENS(HdSceneGlobalsSchemaTokens, HD_API,
52 HD_SCENE_GLOBALS_SCHEMA_TOKENS);
53
54//-----------------------------------------------------------------------------
55
56
73{
74public:
77
78 HdSceneGlobalsSchema(HdContainerDataSourceHandle container)
79 : HdSchema(container) {}
80
86 HD_API
88 const HdContainerDataSourceHandle &fromParentContainer);
89
91
92// --(BEGIN CUSTOM CODE: Schema Methods)--
93
100 HD_API
103 const HdSceneIndexBaseRefPtr &si);
104
107 static const SdfPath&
111
112// --(END CUSTOM CODE: Schema Methods)--
113
116
117 HD_API
118 HdPathDataSourceHandle GetPrimaryCameraPrim() const;
119
120 HD_API
121 HdPathDataSourceHandle GetActiveRenderPassPrim() const;
122
123 HD_API
124 HdPathDataSourceHandle GetActiveRenderSettingsPrim() const;
125
126 HD_API
127 HdDoubleDataSourceHandle GetStartTimeCode() const;
128
129 HD_API
130 HdDoubleDataSourceHandle GetEndTimeCode() const;
131
132 HD_API
133 HdDoubleDataSourceHandle GetTimeCodesPerSecond() const;
134
135 HD_API
136 HdDoubleDataSourceHandle GetCurrentFrame() const;
137
138 HD_API
139 HdIntDataSourceHandle GetSceneStateId() const;
140
142 HD_API
144
146
149
152 HD_API
153 static const TfToken &GetSchemaToken();
154
157 HD_API
159
161
170
172 HD_API
174
176 HD_API
178
180 HD_API
182
184 HD_API
186
188 HD_API
190
192 HD_API
194
196 HD_API
198
200 HD_API
202
204 HD_API
207
210
218 HD_API
219 static HdContainerDataSourceHandle
221 const HdPathDataSourceHandle &primaryCameraPrim,
222 const HdPathDataSourceHandle &activeRenderPassPrim,
223 const HdPathDataSourceHandle &activeRenderSettingsPrim,
224 const HdDoubleDataSourceHandle &startTimeCode,
225 const HdDoubleDataSourceHandle &endTimeCode,
226 const HdDoubleDataSourceHandle &timeCodesPerSecond,
227 const HdDoubleDataSourceHandle &currentFrame,
228 const HdIntDataSourceHandle &sceneStateId,
229 const HdVectorDataSourceHandle &primIdToPath
230 );
231
238 class Builder
239 {
240 public:
241 HD_API
242 Builder &SetPrimaryCameraPrim(
243 const HdPathDataSourceHandle &primaryCameraPrim);
244 HD_API
245 Builder &SetActiveRenderPassPrim(
246 const HdPathDataSourceHandle &activeRenderPassPrim);
247 HD_API
248 Builder &SetActiveRenderSettingsPrim(
249 const HdPathDataSourceHandle &activeRenderSettingsPrim);
250 HD_API
251 Builder &SetStartTimeCode(
252 const HdDoubleDataSourceHandle &startTimeCode);
253 HD_API
254 Builder &SetEndTimeCode(
255 const HdDoubleDataSourceHandle &endTimeCode);
256 HD_API
257 Builder &SetTimeCodesPerSecond(
258 const HdDoubleDataSourceHandle &timeCodesPerSecond);
259 HD_API
260 Builder &SetCurrentFrame(
261 const HdDoubleDataSourceHandle &currentFrame);
262 HD_API
263 Builder &SetSceneStateId(
264 const HdIntDataSourceHandle &sceneStateId);
265 HD_API
266 Builder &SetPrimIdToPath(
267 const HdVectorDataSourceHandle &primIdToPath);
268
270 HD_API
271 HdContainerDataSourceHandle Build();
272
273 private:
274 HdPathDataSourceHandle _primaryCameraPrim;
275 HdPathDataSourceHandle _activeRenderPassPrim;
276 HdPathDataSourceHandle _activeRenderSettingsPrim;
277 HdDoubleDataSourceHandle _startTimeCode;
278 HdDoubleDataSourceHandle _endTimeCode;
279 HdDoubleDataSourceHandle _timeCodesPerSecond;
280 HdDoubleDataSourceHandle _currentFrame;
281 HdIntDataSourceHandle _sceneStateId;
282 HdVectorDataSourceHandle _primIdToPath;
283
284 };
285
287};
288
289PXR_NAMESPACE_CLOSE_SCOPE
290
291#endif
Represents an object that can identify the location of a data source.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
The HdSceneGlobalsSchema encapsulates "global" state to orchestrate a render.
static HD_API const HdDataSourceLocator & GetEndTimeCodeLocator()
Prim-level relative data source locator to locate endTimeCode.
static HD_API const HdDataSourceLocator & GetCurrentFrameLocator()
Prim-level relative data source locator to locate currentFrame.
static HD_API const HdDataSourceLocator & GetSceneStateIdLocator()
Prim-level relative data source locator to locate sceneStateId.
static HD_API const HdDataSourceLocator & GetActiveRenderPassPrimLocator()
Prim-level relative data source locator to locate activeRenderPassPrim.
static HD_API const HdDataSourceLocator & GetPrimaryCameraPrimLocator()
Prim-level relative data source locator to locate primaryCameraPrim.
static HD_API const HdDataSourceLocator & GetStartTimeCodeLocator()
Prim-level relative data source locator to locate startTimeCode.
static HD_API const HdDataSourceLocator & GetActiveRenderSettingsPrimLocator()
Prim-level relative data source locator to locate activeRenderSettingsPrim.
static HD_API HdContainerDataSourceHandle BuildRetained(const HdPathDataSourceHandle &primaryCameraPrim, const HdPathDataSourceHandle &activeRenderPassPrim, const HdPathDataSourceHandle &activeRenderSettingsPrim, const HdDoubleDataSourceHandle &startTimeCode, const HdDoubleDataSourceHandle &endTimeCode, const HdDoubleDataSourceHandle &timeCodesPerSecond, const HdDoubleDataSourceHandle &currentFrame, const HdIntDataSourceHandle &sceneStateId, const HdVectorDataSourceHandle &primIdToPath)
HD_API HdPathVectorSchema GetPrimIdToPath() const
Maps id's from PrimId schema to prim paths.
static HD_API HdSceneGlobalsSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "sceneGlobals" from the parent...
static HD_API const HdDataSourceLocator & GetPrimIdToPathLocator()
Prim-level relative data source locator to locate primIdToPath.
static const SdfPath & GetDefaultPrimPath()
Utility method to concretize the convention of parking the "sceneGlobals" container at the root prim ...
static HD_API const HdDataSourceLocator & GetTimeCodesPerSecondLocator()
Prim-level relative data source locator to locate timeCodesPerSecond.
static HD_API const TfToken & GetSchemaToken()
Returns a token where the container representing this schema is found in a container by default.
static HD_API HdSceneGlobalsSchema GetFromSceneIndex(const HdSceneIndexBaseRefPtr &si)
Constructs and returns a HdSceneGlobalsSchema from the root prim in the scene index.
static HD_API const HdDataSourceLocator & GetDefaultLocator()
Returns an HdDataSourceLocator (relative to the prim-level data source) where the container represent...
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition schema.h:26
Template class wrapping a vector data source whose children are data source of an expected type.
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
static SDF_API const SdfPath & AbsoluteRootPath()
The absolute path representing the top of the namespace hierarchy.
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:81
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.