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// --(END CUSTOM CODE: Includes)--
31
32PXR_NAMESPACE_OPEN_SCOPE
33
34// --(BEGIN CUSTOM CODE: Declares)--
35// --(END CUSTOM CODE: Declares)--
36
37#define HD_SCENE_GLOBALS_SCHEMA_TOKENS \
38 (sceneGlobals) \
39 (primaryCameraPrim) \
40 (activeRenderPassPrim) \
41 (activeRenderSettingsPrim) \
42 (startTimeCode) \
43 (endTimeCode) \
44 (timeCodesPerSecond) \
45 (currentFrame) \
46 (sceneStateId) \
47
48TF_DECLARE_PUBLIC_TOKENS(HdSceneGlobalsSchemaTokens, HD_API,
49 HD_SCENE_GLOBALS_SCHEMA_TOKENS);
50
51//-----------------------------------------------------------------------------
52
53
70{
71public:
74
75 HdSceneGlobalsSchema(HdContainerDataSourceHandle container)
76 : HdSchema(container) {}
77
83 HD_API
85 const HdContainerDataSourceHandle &fromParentContainer);
86
88
89// --(BEGIN CUSTOM CODE: Schema Methods)--
90
97 HD_API
100 const HdSceneIndexBaseRefPtr &si);
101
104 static const SdfPath&
107 }
108
109// --(END CUSTOM CODE: Schema Methods)--
110
113
114 HD_API
115 HdPathDataSourceHandle GetPrimaryCameraPrim() const;
116
117 HD_API
118 HdPathDataSourceHandle GetActiveRenderPassPrim() const;
119
120 HD_API
121 HdPathDataSourceHandle GetActiveRenderSettingsPrim() const;
122
123 HD_API
124 HdDoubleDataSourceHandle GetStartTimeCode() const;
125
126 HD_API
127 HdDoubleDataSourceHandle GetEndTimeCode() const;
128
129 HD_API
130 HdDoubleDataSourceHandle GetTimeCodesPerSecond() const;
131
132 HD_API
133 HdDoubleDataSourceHandle GetCurrentFrame() const;
134
135 HD_API
136 HdIntDataSourceHandle GetSceneStateId() const;
137
139
142
145 HD_API
146 static const TfToken &GetSchemaToken();
147
150 HD_API
152
154
163
165 HD_API
167
169 HD_API
171
173 HD_API
175
177 HD_API
179
181 HD_API
183
185 HD_API
187
189 HD_API
191
193 HD_API
196
199
207 HD_API
208 static HdContainerDataSourceHandle
210 const HdPathDataSourceHandle &primaryCameraPrim,
211 const HdPathDataSourceHandle &activeRenderPassPrim,
212 const HdPathDataSourceHandle &activeRenderSettingsPrim,
213 const HdDoubleDataSourceHandle &startTimeCode,
214 const HdDoubleDataSourceHandle &endTimeCode,
215 const HdDoubleDataSourceHandle &timeCodesPerSecond,
216 const HdDoubleDataSourceHandle &currentFrame,
217 const HdIntDataSourceHandle &sceneStateId
218 );
219
227 {
228 public:
229 HD_API
230 Builder &SetPrimaryCameraPrim(
231 const HdPathDataSourceHandle &primaryCameraPrim);
232 HD_API
233 Builder &SetActiveRenderPassPrim(
234 const HdPathDataSourceHandle &activeRenderPassPrim);
235 HD_API
236 Builder &SetActiveRenderSettingsPrim(
237 const HdPathDataSourceHandle &activeRenderSettingsPrim);
238 HD_API
239 Builder &SetStartTimeCode(
240 const HdDoubleDataSourceHandle &startTimeCode);
241 HD_API
242 Builder &SetEndTimeCode(
243 const HdDoubleDataSourceHandle &endTimeCode);
244 HD_API
245 Builder &SetTimeCodesPerSecond(
246 const HdDoubleDataSourceHandle &timeCodesPerSecond);
247 HD_API
248 Builder &SetCurrentFrame(
249 const HdDoubleDataSourceHandle &currentFrame);
250 HD_API
251 Builder &SetSceneStateId(
252 const HdIntDataSourceHandle &sceneStateId);
253
255 HD_API
256 HdContainerDataSourceHandle Build();
257
258 private:
259 HdPathDataSourceHandle _primaryCameraPrim;
260 HdPathDataSourceHandle _activeRenderPassPrim;
261 HdPathDataSourceHandle _activeRenderSettingsPrim;
262 HdDoubleDataSourceHandle _startTimeCode;
263 HdDoubleDataSourceHandle _endTimeCode;
264 HdDoubleDataSourceHandle _timeCodesPerSecond;
265 HdDoubleDataSourceHandle _currentFrame;
266 HdIntDataSourceHandle _sceneStateId;
267
268 };
269
271};
272
273PXR_NAMESPACE_CLOSE_SCOPE
274
275#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 HdSceneGlobalsSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "sceneGlobals" from the parent...
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 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)
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
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
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:71
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92