Loading...
Searching...
No Matches
HdSceneGlobalsSchema Class Reference

The HdSceneGlobalsSchema encapsulates "global" state to orchestrate a render. More...

#include <sceneGlobalsSchema.h>

+ Inheritance diagram for HdSceneGlobalsSchema:

Classes

class  Builder
 Utility class for setting sparse sets of child data source fields to be filled as arguments into BuildRetained. More...
 

Public Member Functions

Member accessor
HD_API HdPathDataSourceHandle GetPrimaryCameraPrim () const
 
HD_API HdPathDataSourceHandle GetActiveRenderPassPrim () const
 
HD_API HdPathDataSourceHandle GetActiveRenderSettingsPrim () const
 
HD_API HdDoubleDataSourceHandle GetStartTimeCode () const
 
HD_API HdDoubleDataSourceHandle GetEndTimeCode () const
 
HD_API HdDoubleDataSourceHandle GetTimeCodesPerSecond () const
 
HD_API HdDoubleDataSourceHandle GetCurrentFrame () const
 
HD_API HdIntDataSourceHandle GetSceneStateId () const
 
- Public Member Functions inherited from HdSchema
 HdSchema (HdContainerDataSourceHandle container)
 
HD_API HdContainerDataSourceHandle GetContainer () const
 Returns the container data source that this schema is interpreting.
 
HD_API bool IsDefined () const
 
 operator bool () const
 Returns true if this schema is applied on top of a non-null container.
 

Static Public Member Functions

static HD_API HdSceneGlobalsSchema GetFromSceneIndex (const HdSceneIndexBaseRefPtr &si)
 Constructs and returns a HdSceneGlobalsSchema from the root prim in the scene index.
 
static const SdfPathGetDefaultPrimPath ()
 Utility method to concretize the convention of parking the "sceneGlobals" container at the root prim of the scene index.
 
Schema location
static HD_API const TfTokenGetSchemaToken ()
 Returns a token where the container representing this schema is found in a container by default.
 
static HD_API const HdDataSourceLocatorGetDefaultLocator ()
 Returns an HdDataSourceLocator (relative to the prim-level data source) where the container representing this schema is found by default.
 
Data source locators for members

The following methods return an HdDataSourceLocator (relative to the prim-level data source) where the data source for a member can be found.

This is often useful for checking intersection against the HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.

static HD_API const HdDataSourceLocatorGetPrimaryCameraPrimLocator ()
 Prim-level relative data source locator to locate primaryCameraPrim.
 
static HD_API const HdDataSourceLocatorGetActiveRenderPassPrimLocator ()
 Prim-level relative data source locator to locate activeRenderPassPrim.
 
static HD_API const HdDataSourceLocatorGetActiveRenderSettingsPrimLocator ()
 Prim-level relative data source locator to locate activeRenderSettingsPrim.
 
static HD_API const HdDataSourceLocatorGetStartTimeCodeLocator ()
 Prim-level relative data source locator to locate startTimeCode.
 
static HD_API const HdDataSourceLocatorGetEndTimeCodeLocator ()
 Prim-level relative data source locator to locate endTimeCode.
 
static HD_API const HdDataSourceLocatorGetTimeCodesPerSecondLocator ()
 Prim-level relative data source locator to locate timeCodesPerSecond.
 
static HD_API const HdDataSourceLocatorGetCurrentFrameLocator ()
 Prim-level relative data source locator to locate currentFrame.
 
static HD_API const HdDataSourceLocatorGetSceneStateIdLocator ()
 Prim-level relative data source locator to locate sceneStateId.
 
Schema construction
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)
 

Schema retrieval

 HdSceneGlobalsSchema (HdContainerDataSourceHandle container)
 
static HD_API HdSceneGlobalsSchema GetFromParent (const HdContainerDataSourceHandle &fromParentContainer)
 Retrieves a container data source with the schema's default name token "sceneGlobals" from the parent container and constructs a HdSceneGlobalsSchema instance.
 

Additional Inherited Members

- Public Types inherited from HdSchema
using UnderlyingDataSource = HdContainerDataSource
 
- Protected Member Functions inherited from HdSchema
template<typename T >
T::Handle _GetTypedDataSource (TfToken name) const
 Returns a datasource of the requested type for the given name: schema implementations can use this to ask for child containers, sampled values, vectors, etc.
 
- Protected Attributes inherited from HdSchema
HdContainerDataSourceHandle _container
 

Detailed Description

The HdSceneGlobalsSchema encapsulates "global" state to orchestrate a render.

It currently houses the active render settings and pass prim paths that describe the information necessary to generate images from a single invocation of a renderer, the active time sample range and current frame number that may be relevant to downstream scene indices (e.g. procedural evaluation), the time codes per second (sometimes informally referred to as FPS), and the primary camera.

We shall use the convention of a container data source at the root prim of the scene index that is populated with this global state. The renderer and downstream scene indices can query it to configure their behavior as necessary.

Definition at line 69 of file sceneGlobalsSchema.h.

Constructor & Destructor Documentation

◆ HdSceneGlobalsSchema()

HdSceneGlobalsSchema ( HdContainerDataSourceHandle  container)
inline

Definition at line 75 of file sceneGlobalsSchema.h.

Member Function Documentation

◆ BuildRetained()

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
Deprecated:
Use Builder instead.

Builds a container data source which includes the provided child data sources. Parameters with nullptr values are excluded. This is a low-level interface. For cases in which it's desired to define the container with a sparse set of child fields, the Builder class is often more convenient and readable.

◆ GetActiveRenderPassPrimLocator()

static HD_API const HdDataSourceLocator & GetActiveRenderPassPrimLocator ( )
static

Prim-level relative data source locator to locate activeRenderPassPrim.

◆ GetActiveRenderSettingsPrimLocator()

static HD_API const HdDataSourceLocator & GetActiveRenderSettingsPrimLocator ( )
static

Prim-level relative data source locator to locate activeRenderSettingsPrim.

◆ GetCurrentFrameLocator()

static HD_API const HdDataSourceLocator & GetCurrentFrameLocator ( )
static

Prim-level relative data source locator to locate currentFrame.

◆ GetDefaultLocator()

static HD_API const HdDataSourceLocator & GetDefaultLocator ( )
static

Returns an HdDataSourceLocator (relative to the prim-level data source) where the container representing this schema is found by default.

◆ GetDefaultPrimPath()

static const SdfPath & GetDefaultPrimPath ( )
inlinestatic

Utility method to concretize the convention of parking the "sceneGlobals" container at the root prim of the scene index.

Definition at line 105 of file sceneGlobalsSchema.h.

◆ GetEndTimeCodeLocator()

static HD_API const HdDataSourceLocator & GetEndTimeCodeLocator ( )
static

Prim-level relative data source locator to locate endTimeCode.

◆ GetFromParent()

static HD_API HdSceneGlobalsSchema GetFromParent ( const HdContainerDataSourceHandle &  fromParentContainer)
static

Retrieves a container data source with the schema's default name token "sceneGlobals" from the parent container and constructs a HdSceneGlobalsSchema instance.

Because the requested container data source may not exist, the result should be checked with IsDefined() or a bool comparison before use.

◆ GetFromSceneIndex()

static HD_API HdSceneGlobalsSchema GetFromSceneIndex ( const HdSceneIndexBaseRefPtr &  si)
static

Constructs and returns a HdSceneGlobalsSchema from the root prim in the scene index.

Since the root prim might not have a data source for this schema, the result should be checked with IsDefined() or a bool conversion before use.

Note
This API is preferable to GetFromParent(container).

◆ GetPrimaryCameraPrimLocator()

static HD_API const HdDataSourceLocator & GetPrimaryCameraPrimLocator ( )
static

Prim-level relative data source locator to locate primaryCameraPrim.

◆ GetSceneStateIdLocator()

static HD_API const HdDataSourceLocator & GetSceneStateIdLocator ( )
static

Prim-level relative data source locator to locate sceneStateId.

◆ GetSchemaToken()

static HD_API const TfToken & GetSchemaToken ( )
static

Returns a token where the container representing this schema is found in a container by default.

◆ GetStartTimeCodeLocator()

static HD_API const HdDataSourceLocator & GetStartTimeCodeLocator ( )
static

Prim-level relative data source locator to locate startTimeCode.

◆ GetTimeCodesPerSecondLocator()

static HD_API const HdDataSourceLocator & GetTimeCodesPerSecondLocator ( )
static

Prim-level relative data source locator to locate timeCodesPerSecond.


The documentation for this class was generated from the following file: