18#ifndef PXR_IMAGING_HD_SCENE_GLOBALS_SCHEMA_H
19#define PXR_IMAGING_HD_SCENE_GLOBALS_SCHEMA_H
23#include "pxr/imaging/hd/api.h"
25#include "pxr/imaging/hd/schema.h"
28#include "pxr/usd/sdf/path.h"
29#include "pxr/imaging/hd/sceneIndex.h"
32PXR_NAMESPACE_OPEN_SCOPE
37#define HD_SCENE_GLOBALS_SCHEMA_TOKENS \
40 (activeRenderPassPrim) \
41 (activeRenderSettingsPrim) \
44 (timeCodesPerSecond) \
49 HD_SCENE_GLOBALS_SCHEMA_TOKENS);
85 const HdContainerDataSourceHandle &fromParentContainer);
100 const HdSceneIndexBaseRefPtr &si);
115 HdPathDataSourceHandle GetPrimaryCameraPrim()
const;
118 HdPathDataSourceHandle GetActiveRenderPassPrim()
const;
121 HdPathDataSourceHandle GetActiveRenderSettingsPrim()
const;
124 HdDoubleDataSourceHandle GetStartTimeCode()
const;
127 HdDoubleDataSourceHandle GetEndTimeCode()
const;
130 HdDoubleDataSourceHandle GetTimeCodesPerSecond()
const;
133 HdDoubleDataSourceHandle GetCurrentFrame()
const;
136 HdIntDataSourceHandle GetSceneStateId()
const;
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 ¤tFrame,
217 const HdIntDataSourceHandle &sceneStateId
231 const HdPathDataSourceHandle &primaryCameraPrim);
233 Builder &SetActiveRenderPassPrim(
234 const HdPathDataSourceHandle &activeRenderPassPrim);
236 Builder &SetActiveRenderSettingsPrim(
237 const HdPathDataSourceHandle &activeRenderSettingsPrim);
240 const HdDoubleDataSourceHandle &startTimeCode);
243 const HdDoubleDataSourceHandle &endTimeCode);
245 Builder &SetTimeCodesPerSecond(
246 const HdDoubleDataSourceHandle &timeCodesPerSecond);
249 const HdDoubleDataSourceHandle ¤tFrame);
252 const HdIntDataSourceHandle &sceneStateId);
256 HdContainerDataSourceHandle
Build();
259 HdPathDataSourceHandle _primaryCameraPrim;
260 HdPathDataSourceHandle _activeRenderPassPrim;
261 HdPathDataSourceHandle _activeRenderSettingsPrim;
262 HdDoubleDataSourceHandle _startTimeCode;
263 HdDoubleDataSourceHandle _endTimeCode;
264 HdDoubleDataSourceHandle _timeCodesPerSecond;
265 HdDoubleDataSourceHandle _currentFrame;
266 HdIntDataSourceHandle _sceneStateId;
273PXR_NAMESPACE_CLOSE_SCOPE
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 ¤tFrame, 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...
A path value used to locate objects in layers or scenegraphs.
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.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.