Loading...
Searching...
No Matches
HdCoordSys Class Reference

HdCoordSys representes a coordinate system as a Hydra state prim. More...

#include <coordSys.h>

+ Inheritance diagram for HdCoordSys:

Public Types

enum  DirtyBits : HdDirtyBits { Clean = 0 , DirtyName = 1 << 0 , DirtyTransform = 1 << 1 , AllDirty }
 

Public Member Functions

HD_API HdCoordSys (SdfPath const &id)
 
TfToken GetName () const
 Returns the name bound to this coordinate system.
 
HD_API void Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
 Synchronizes state from the delegate to this object.
 
HD_API HdDirtyBits GetInitialDirtyBitsMask () const override
 Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of this prim.
 
- Public Member Functions inherited from HdSprim
HD_API HdSprim (SdfPath const &id)
 
SdfPath const & GetId () const
 Returns the identifier by which this state is known.
 
virtual void Sync (HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits)=0
 Synchronizes state from the delegate to this object.
 
virtual HD_API void Finalize (HdRenderParam *renderParam)
 Finalizes object resources.
 
virtual HdDirtyBits GetInitialDirtyBitsMask () const =0
 Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of this prim.
 

Detailed Description

HdCoordSys representes a coordinate system as a Hydra state prim.

Coordinate systems may be referred to by name from a shader network. Following the convention in UsdShadeCoordSysAPI, we use the Hydra id to establish the name, where the id is a namespaced property path of the form <.../prim.coordSys:NAME>. GetName() will retrieve the name.

Each rprim may have a set of bound coordinate systems, which may be retrieved via the HdTokens->coordSysBindings key. The returned value is of type HdIdVectorSharedPtr, a reference- counted pointer to a vector of ids of coordinate systems. The intention of this design is to make it efficient for scene delegates to communicate to renderer delegates the common mappings of bound coordinate systems across groups of rprims.

The transform value of an HdCoordSys is the matrix representation of the transform from its local space to world space. In other words, it has the same interpretation as the transform for rprims.

Definition at line 56 of file coordSys.h.

Member Enumeration Documentation

◆ DirtyBits

enum DirtyBits : HdDirtyBits

Definition at line 65 of file coordSys.h.

Member Function Documentation

◆ GetInitialDirtyBitsMask()

HD_API HdDirtyBits GetInitialDirtyBitsMask ( ) const
overridevirtual

Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of this prim.

Typically this would be all dirty bits.

Implements HdSprim.

Reimplemented in HdPrmanCoordSys.

◆ GetName()

TfToken GetName ( ) const
inline

Returns the name bound to this coordinate system.

There may be multiple coordinate systems with the same name, but they must associate with disjoint sets of rprims.

Definition at line 77 of file coordSys.h.

◆ Sync()

HD_API void Sync ( HdSceneDelegate sceneDelegate,
HdRenderParam renderParam,
HdDirtyBits *  dirtyBits 
)
overridevirtual

Synchronizes state from the delegate to this object.

Parameters
[in,out]dirtyBitsOn input specifies which state is is dirty and can be pulled from the scene delegate. On output specifies which bits are still dirty and were not cleaned by the sync.

Implements HdSprim.

Reimplemented in HdPrmanCoordSys.


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