This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
HdSceneDelegate Class Reference

Adapter class providing data exchange with the client scene graph. More...

#include <sceneDelegate.h>

+ Inheritance diagram for HdSceneDelegate:

Public Member Functions

HD_API HdSceneDelegate (HdRenderIndex *parentIndex, SdfPath const &delegateID)
 Constructor used for nested delegate objects which share a RenderIndex.
 
HdRenderIndexGetRenderIndex ()
 Returns the RenderIndex owned by this delegate.
 
SdfPath const & GetDelegateID () const
 Returns the ID of this delegate, which is used as a prefix for all objects it creates in the RenderIndex.
 
virtual HD_API void Sync (HdSyncRequestVector *request)
 Synchronizes the delegate state for the given request vector.
 
virtual HD_API void PostSyncCleanup ()
 Opportunity for the delegate to clean itself up after performing parallel work during sync phase.
 
Options
virtual HD_API bool IsEnabled (TfToken const &option) const
 Returns true if the named option is enabled by the delegate.
 
Rprim Aspects
virtual HD_API HdMeshTopology GetMeshTopology (SdfPath const &id)
 Gets the topological mesh data for a given prim.
 
virtual HD_API HdBasisCurvesTopology GetBasisCurvesTopology (SdfPath const &id)
 Gets the topological curve data for a given prim.
 
virtual HD_API PxOsdSubdivTags GetSubdivTags (SdfPath const &id)
 Gets the subdivision surface tags (sharpness, holes, etc).
 
virtual HD_API GfRange3d GetExtent (SdfPath const &id)
 Gets the axis aligned bounds of a prim.
 
virtual HD_API GfMatrix4d GetTransform (SdfPath const &id)
 Returns the object space transform, including all parent transforms.
 
virtual HD_API bool GetVisible (SdfPath const &id)
 Returns the authored visible state of the prim.
 
virtual HD_API bool GetDoubleSided (SdfPath const &id)
 Returns the doubleSided state for the given prim.
 
virtual HD_API HdCullStyle GetCullStyle (SdfPath const &id)
 Returns the cullstyle for the given prim.
 
virtual HD_API VtValue GetShadingStyle (SdfPath const &id)
 Returns the shading style for the given prim.
 
virtual HD_API HdDisplayStyle GetDisplayStyle (SdfPath const &id)
 Returns the refinement level for the given prim in the range [0,8].
 
virtual HD_API VtValue Get (SdfPath const &id, TfToken const &key)
 Returns a named value.
 
virtual HD_API VtValue GetIndexedPrimvar (SdfPath const &id, TfToken const &key, VtIntArray *outIndices)
 Returns a named primvar value.
 
virtual HD_API HdReprSelector GetReprSelector (SdfPath const &id)
 Returns the authored repr (if any) for the given prim.
 
virtual HD_API TfToken GetRenderTag (SdfPath const &id)
 Returns the render tag that will be used to bucket prims during render pass bucketing.
 
virtual HD_API VtArray< TfTokenGetCategories (SdfPath const &id)
 Returns the prim categories.
 
virtual HD_API std::vector< VtArray< TfToken > > GetInstanceCategories (SdfPath const &instancerId)
 Returns the categories for each of the instances in the instancer.
 
virtual HD_API HdIdVectorSharedPtr GetCoordSysBindings (SdfPath const &id)
 Returns the coordinate system bindings, or a nullptr if none are bound.
 
virtual HD_API HdModelDrawMode GetModelDrawMode (SdfPath const &id)
 Returns the model draw mode object for the given prim.
 
Motion samples
virtual HD_API size_t SampleTransform (SdfPath const &id, size_t maxSampleCount, float *sampleTimes, GfMatrix4d *sampleValues)
 Store up to maxSampleCount transform samples in *sampleValues.
 
virtual HD_API size_t SampleTransform (SdfPath const &id, float startTime, float endTime, size_t maxSampleCount, float *sampleTimes, GfMatrix4d *sampleValues)
 
template<unsigned int CAPACITY>
void SampleTransform (SdfPath const &id, HdTimeSampleArray< GfMatrix4d, CAPACITY > *sa)
 Convenience form of SampleTransform() that takes an HdTimeSampleArray.
 
template<unsigned int CAPACITY>
void SampleTransform (SdfPath const &id, float startTime, float endTime, HdTimeSampleArray< GfMatrix4d, CAPACITY > *sa)
 Convenience form of SampleTransform() that takes an HdTimeSampleArray.
 
virtual HD_API size_t SampleInstancerTransform (SdfPath const &instancerId, size_t maxSampleCount, float *sampleTimes, GfMatrix4d *sampleValues)
 Store up to maxSampleCount transform samples in *sampleValues.
 
virtual HD_API size_t SampleInstancerTransform (SdfPath const &instancerId, float startTime, float endTime, size_t maxSampleCount, float *sampleTimes, GfMatrix4d *sampleValues)
 
template<unsigned int CAPACITY>
void SampleInstancerTransform (SdfPath const &instancerId, HdTimeSampleArray< GfMatrix4d, CAPACITY > *sa)
 Convenience form of SampleInstancerTransform() that takes an HdTimeSampleArray.
 
template<unsigned int CAPACITY>
void SampleInstancerTransform (SdfPath const &instancerId, float startTime, float endTime, HdTimeSampleArray< GfMatrix4d, CAPACITY > *sa)
 Convenience form of SampleInstancerTransform() that takes an HdTimeSampleArray.
 
virtual HD_API size_t SamplePrimvar (SdfPath const &id, TfToken const &key, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues)
 Store up to maxSampleCount primvar samples in *samplesValues.
 
virtual HD_API size_t SamplePrimvar (SdfPath const &id, TfToken const &key, float startTime, float endTime, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues)
 
template<unsigned int CAPACITY>
void SamplePrimvar (SdfPath const &id, TfToken const &key, HdTimeSampleArray< VtValue, CAPACITY > *sa)
 Convenience form of SamplePrimvar() that takes an HdTimeSampleArray.
 
template<unsigned int CAPACITY>
void SamplePrimvar (SdfPath const &id, TfToken const &key, float startTime, float endTime, HdTimeSampleArray< VtValue, CAPACITY > *sa)
 Convenience form of SamplePrimvar() that takes an HdTimeSampleArray.
 
virtual HD_API size_t SampleIndexedPrimvar (SdfPath const &id, TfToken const &key, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues, VtIntArray *sampleIndices)
 SamplePrimvar() for getting an unflattened primvar and its indices.
 
virtual HD_API size_t SampleIndexedPrimvar (SdfPath const &id, TfToken const &key, float startTime, float endTime, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues, VtIntArray *sampleIndices)
 
template<unsigned int CAPACITY>
void SampleIndexedPrimvar (SdfPath const &id, TfToken const &key, HdIndexedTimeSampleArray< VtValue, CAPACITY > *sa)
 Convenience form of SampleIndexedPrimvar() that takes HdTimeSampleArrays.
 
template<unsigned int CAPACITY>
void SampleIndexedPrimvar (SdfPath const &id, TfToken const &key, float startTime, float endTime, HdIndexedTimeSampleArray< VtValue, CAPACITY > *sa)
 Convenience form of SampleIndexedPrimvar() that takes HdTimeSampleArrays.
 
Instancer prototypes
virtual HD_API VtIntArray GetInstanceIndices (SdfPath const &instancerId, SdfPath const &prototypeId)
 Gets the extracted indices array of the prototype id used in the instancer.
 
virtual HD_API GfMatrix4d GetInstancerTransform (SdfPath const &instancerId)
 Returns the instancer transform.
 
virtual HD_API SdfPath GetInstancerId (SdfPath const &primId)
 Returns the parent instancer of the given rprim or instancer.
 
virtual HD_API SdfPathVector GetInstancerPrototypes (SdfPath const &instancerId)
 Returns a list of prototypes of this instancer.
 
Path Translation
virtual HD_API SdfPath GetScenePrimPath (SdfPath const &rprimId, int instanceIndex, HdInstancerContext *instancerContext=nullptr)
 Returns the scene address of the prim corresponding to the given rprim/instance index.
 
virtual HD_API SdfPathVector GetScenePrimPaths (SdfPath const &rprimId, std::vector< int > instanceIndices, std::vector< HdInstancerContext > *instancerContexts=nullptr)
 A vectorized version of GetScenePrimPath that allows the prim adapter to amortize expensive calculations across a number of path evaluations in a single call.
 
Material Aspects
virtual HD_API SdfPath GetMaterialId (SdfPath const &rprimId)
 Returns the material ID bound to the rprim rprimId.
 
virtual HD_API VtValue GetMaterialResource (SdfPath const &materialId)
 
Renderbuffer Aspects
virtual HD_API HdRenderBufferDescriptor GetRenderBufferDescriptor (SdfPath const &id)
 Returns the allocation descriptor for a given render buffer prim.
 
Light Aspects
virtual HD_API VtValue GetLightParamValue (SdfPath const &id, TfToken const &paramName)
 
Camera Aspects
virtual HD_API VtValue GetCameraParamValue (SdfPath const &cameraId, TfToken const &paramName)
 Returns a single value for a given camera and parameter.
 
Volume Aspects
virtual HD_API HdVolumeFieldDescriptorVector GetVolumeFieldDescriptors (SdfPath const &volumeId)
 
ExtComputation Aspects
virtual HD_API TfTokenVector GetExtComputationSceneInputNames (SdfPath const &computationId)
 For the given computation id, returns a list of inputs which will be requested from the scene delegate using the Get() method.
 
virtual HD_API HdExtComputationInputDescriptorVector GetExtComputationInputDescriptors (SdfPath const &computationId)
 For the given computation id, returns a list of computation input descriptors.
 
virtual HD_API HdExtComputationOutputDescriptorVector GetExtComputationOutputDescriptors (SdfPath const &computationId)
 For the given computation id, returns a list of computation output descriptors.
 
virtual HD_API HdExtComputationPrimvarDescriptorVector GetExtComputationPrimvarDescriptors (SdfPath const &id, HdInterpolation interpolationMode)
 Returns a list of primvar names that should be bound to a generated output from an ExtComputation for the given prim id and interpolation mode.
 
virtual HD_API VtValue GetExtComputationInput (SdfPath const &computationId, TfToken const &input)
 Returns a single value for a given computation id and input token.
 
virtual HD_API size_t SampleExtComputationInput (SdfPath const &computationId, TfToken const &input, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues)
 Return up to maxSampleCount samples for a given computation id and input token.
 
virtual HD_API size_t SampleExtComputationInput (SdfPath const &computationId, TfToken const &input, float startTime, float endTime, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues)
 
template<unsigned int CAPACITY>
void SampleExtComputationInput (SdfPath const &computationId, TfToken const &input, HdTimeSampleArray< VtValue, CAPACITY > *sa)
 Convenience form of SampleExtComputationInput() that takes an HdTimeSampleArray.
 
template<unsigned int CAPACITY>
void SampleExtComputationInput (SdfPath const &computationId, TfToken const &input, float startTime, float endTime, HdTimeSampleArray< VtValue, CAPACITY > *sa)
 Convenience form of SampleExtComputationInput() that takes an HdTimeSampleArray.
 
virtual HD_API std::string GetExtComputationKernel (SdfPath const &computationId)
 Returns the kernel source assigned to the computation at the path id.
 
virtual HD_API void InvokeExtComputation (SdfPath const &computationId, HdExtComputationContext *context)
 Requests the scene delegate run the ExtComputation with the given id.
 
Primitive Variables
virtual HD_API HdPrimvarDescriptorVector GetPrimvarDescriptors (SdfPath const &id, HdInterpolation interpolation)
 Returns descriptors for all primvars of the given interpolation type.
 

Task Aspects

virtual HD_API TfTokenVector GetTaskRenderTags (SdfPath const &taskId)
 

Detailed Description

Adapter class providing data exchange with the client scene graph.

Definition at line 391 of file sceneDelegate.h.

Constructor & Destructor Documentation

◆ HdSceneDelegate()

HD_API HdSceneDelegate ( HdRenderIndex parentIndex,
SdfPath const &  delegateID 
)

Constructor used for nested delegate objects which share a RenderIndex.

Member Function Documentation

◆ Get()

virtual HD_API VtValue Get ( SdfPath const &  id,
TfToken const &  key 
)
virtual

Returns a named value.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetBasisCurvesTopology()

virtual HD_API HdBasisCurvesTopology GetBasisCurvesTopology ( SdfPath const &  id)
virtual

Gets the topological curve data for a given prim.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetCameraParamValue()

virtual HD_API VtValue GetCameraParamValue ( SdfPath const &  cameraId,
TfToken const &  paramName 
)
virtual

Returns a single value for a given camera and parameter.

See HdCameraTokens for the list of paramters.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, HdxFreeCameraSceneDelegate, and UsdImagingDelegate.

◆ GetCategories()

virtual HD_API VtArray< TfToken > GetCategories ( SdfPath const &  id)
virtual

Returns the prim categories.

For instancer prims, the categories returned apply to all its instances.

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ GetCoordSysBindings()

virtual HD_API HdIdVectorSharedPtr GetCoordSysBindings ( SdfPath const &  id)
virtual

Returns the coordinate system bindings, or a nullptr if none are bound.

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ GetCullStyle()

virtual HD_API HdCullStyle GetCullStyle ( SdfPath const &  id)
virtual

Returns the cullstyle for the given prim.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetDelegateID()

SdfPath const & GetDelegateID ( ) const
inline

Returns the ID of this delegate, which is used as a prefix for all objects it creates in the RenderIndex.

The default value is SdfPath::AbsoluteRootPath().

Definition at line 408 of file sceneDelegate.h.

◆ GetDisplayStyle()

virtual HD_API HdDisplayStyle GetDisplayStyle ( SdfPath const &  id)
virtual

Returns the refinement level for the given prim in the range [0,8].

The refinement level indicates how many iterations to apply when subdividing subdivision surfaces or other refinable primitives.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetDoubleSided()

virtual HD_API bool GetDoubleSided ( SdfPath const &  id)
virtual

Returns the doubleSided state for the given prim.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetExtComputationInput()

virtual HD_API VtValue GetExtComputationInput ( SdfPath const &  computationId,
TfToken const &  input 
)
virtual

Returns a single value for a given computation id and input token.

The token may be a computation input or a computation config parameter.

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ GetExtComputationInputDescriptors()

virtual HD_API HdExtComputationInputDescriptorVector GetExtComputationInputDescriptors ( SdfPath const &  computationId)
virtual

For the given computation id, returns a list of computation input descriptors.

See HdExtComputationInputDecriptor

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ GetExtComputationKernel()

virtual HD_API std::string GetExtComputationKernel ( SdfPath const &  computationId)
virtual

Returns the kernel source assigned to the computation at the path id.

If the string is empty the computation has no GPU kernel and the CPU callback should be used.

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ GetExtComputationOutputDescriptors()

virtual HD_API HdExtComputationOutputDescriptorVector GetExtComputationOutputDescriptors ( SdfPath const &  computationId)
virtual

For the given computation id, returns a list of computation output descriptors.

See HdExtComputationOutputDescriptor

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ GetExtComputationPrimvarDescriptors()

virtual HD_API HdExtComputationPrimvarDescriptorVector GetExtComputationPrimvarDescriptors ( SdfPath const &  id,
HdInterpolation  interpolationMode 
)
virtual

Returns a list of primvar names that should be bound to a generated output from an ExtComputation for the given prim id and interpolation mode.

Binding information is obtained through GetExtComputationPrimvarDesc() Returns a structure describing source information for a primvar that is bound to an ExtComputation. See HdExtComputationPrimvarDesc for the expected information to be returned.

Reimplemented in UsdImagingDelegate, and HdSceneIndexAdapterSceneDelegate.

◆ GetExtComputationSceneInputNames()

virtual HD_API TfTokenVector GetExtComputationSceneInputNames ( SdfPath const &  computationId)
virtual

For the given computation id, returns a list of inputs which will be requested from the scene delegate using the Get() method.

See GetExtComputationInputDescriptors and GetExtComputationOutpuDescriptors for descriptions of other computation inputs and outputs.

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ GetExtent()

virtual HD_API GfRange3d GetExtent ( SdfPath const &  id)
virtual

Gets the axis aligned bounds of a prim.

The returned bounds are in the local space of the prim (transform is yet to be applied) and should contain the bounds of any child prims.

The returned bounds does not include any displacement that might occur as the result of running shaders on the prim.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetIndexedPrimvar()

virtual HD_API VtValue GetIndexedPrimvar ( SdfPath const &  id,
TfToken const &  key,
VtIntArray *  outIndices 
)
virtual

Returns a named primvar value.

If *outIndices is not nullptr and the primvar has indices, it will return the unflattened primvar and set *outIndices to the primvar's associated indices, clearing the array if the primvar is not indexed.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetInstanceCategories()

virtual HD_API std::vector< VtArray< TfToken > > GetInstanceCategories ( SdfPath const &  instancerId)
virtual

Returns the categories for each of the instances in the instancer.

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ GetInstanceIndices()

virtual HD_API VtIntArray GetInstanceIndices ( SdfPath const &  instancerId,
SdfPath const &  prototypeId 
)
virtual

Gets the extracted indices array of the prototype id used in the instancer.

example instances: 0, 1, 2, 3, 4, 5 protoypes: A, B, A, A, B, C

GetInstanceIndices(A) : [0, 2, 3] GetInstanceIndices(B) : [1, 4] GetInstanceIndices(C) : [5] GetInstanceIndices(D) : []

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetInstancerId()

virtual HD_API SdfPath GetInstancerId ( SdfPath const &  primId)
virtual

Returns the parent instancer of the given rprim or instancer.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetInstancerPrototypes()

virtual HD_API SdfPathVector GetInstancerPrototypes ( SdfPath const &  instancerId)
virtual

Returns a list of prototypes of this instancer.

The intent is to let renderers cache instance indices by giving them a complete set of prims to call GetInstanceIndices(instancer, prototype) on. XXX: This is currently unused, but may be used in the future.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetInstancerTransform()

virtual HD_API GfMatrix4d GetInstancerTransform ( SdfPath const &  instancerId)
virtual

Returns the instancer transform.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetMaterialId()

virtual HD_API SdfPath GetMaterialId ( SdfPath const &  rprimId)
virtual

Returns the material ID bound to the rprim rprimId.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetMeshTopology()

virtual HD_API HdMeshTopology GetMeshTopology ( SdfPath const &  id)
virtual

Gets the topological mesh data for a given prim.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetModelDrawMode()

virtual HD_API HdModelDrawMode GetModelDrawMode ( SdfPath const &  id)
virtual

Returns the model draw mode object for the given prim.

Reimplemented in UsdImagingDelegate.

◆ GetPrimvarDescriptors()

virtual HD_API HdPrimvarDescriptorVector GetPrimvarDescriptors ( SdfPath const &  id,
HdInterpolation  interpolation 
)
virtual

Returns descriptors for all primvars of the given interpolation type.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetRenderBufferDescriptor()

virtual HD_API HdRenderBufferDescriptor GetRenderBufferDescriptor ( SdfPath const &  id)
virtual

Returns the allocation descriptor for a given render buffer prim.

Reimplemented in HdSceneIndexAdapterSceneDelegate, and HdUnitTestDelegate.

◆ GetRenderIndex()

HdRenderIndex & GetRenderIndex ( )
inline

Returns the RenderIndex owned by this delegate.

Definition at line 402 of file sceneDelegate.h.

◆ GetRenderTag()

virtual HD_API TfToken GetRenderTag ( SdfPath const &  id)
virtual

Returns the render tag that will be used to bucket prims during render pass bucketing.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetReprSelector()

virtual HD_API HdReprSelector GetReprSelector ( SdfPath const &  id)
virtual

Returns the authored repr (if any) for the given prim.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetScenePrimPath()

virtual HD_API SdfPath GetScenePrimPath ( SdfPath const &  rprimId,
int  instanceIndex,
HdInstancerContext *  instancerContext = nullptr 
)
virtual

Returns the scene address of the prim corresponding to the given rprim/instance index.

This is designed to give paths in scene namespace, rather than hydra namespace, so it always strips the delegate ID.

Deprecated:
use GetScenePrimPaths

Reimplemented in UsdImagingDelegate.

◆ GetScenePrimPaths()

virtual HD_API SdfPathVector GetScenePrimPaths ( SdfPath const &  rprimId,
std::vector< int >  instanceIndices,
std::vector< HdInstancerContext > *  instancerContexts = nullptr 
)
virtual

A vectorized version of GetScenePrimPath that allows the prim adapter to amortize expensive calculations across a number of path evaluations in a single call.

Note that only a single rprimId is supported. This allows this call to be forwarded directly to a single prim adapter rather than requiring a lot of data shuffling.

Reimplemented in UsdImagingDelegate.

◆ GetShadingStyle()

virtual HD_API VtValue GetShadingStyle ( SdfPath const &  id)
virtual

Returns the shading style for the given prim.

Reimplemented in HdSceneIndexAdapterSceneDelegate.

◆ GetSubdivTags()

virtual HD_API PxOsdSubdivTags GetSubdivTags ( SdfPath const &  id)
virtual

Gets the subdivision surface tags (sharpness, holes, etc).

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ GetTransform()

virtual HD_API GfMatrix4d GetTransform ( SdfPath const &  id)
virtual

Returns the object space transform, including all parent transforms.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, HdxFreeCameraSceneDelegate, and UsdImagingDelegate.

◆ GetVisible()

virtual HD_API bool GetVisible ( SdfPath const &  id)
virtual

Returns the authored visible state of the prim.

Reimplemented in HdSceneIndexAdapterSceneDelegate, HdUnitTestDelegate, and UsdImagingDelegate.

◆ InvokeExtComputation()

virtual HD_API void InvokeExtComputation ( SdfPath const &  computationId,
HdExtComputationContext context 
)
virtual

Requests the scene delegate run the ExtComputation with the given id.

The context contains the input values that delegate requested through GetExtComputationInputNames().

The scene delegate is expected to set each output identified by GetExtComputationOutputNames() on the context.

Hydra may invoke the computation on a different thread from what HdEngine::Execute() was called on. It may also invoke many computations in parallel.

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ IsEnabled()

virtual HD_API bool IsEnabled ( TfToken const &  option) const
virtual

Returns true if the named option is enabled by the delegate.

◆ PostSyncCleanup()

virtual HD_API void PostSyncCleanup ( )
virtual

Opportunity for the delegate to clean itself up after performing parallel work during sync phase.

Reimplemented in HdSceneIndexAdapterSceneDelegate.

◆ SampleExtComputationInput() [1/3]

void SampleExtComputationInput ( SdfPath const &  computationId,
TfToken const &  input,
float  startTime,
float  endTime,
HdTimeSampleArray< VtValue, CAPACITY > *  sa 
)

Convenience form of SampleExtComputationInput() that takes an HdTimeSampleArray.

Returns the union of the authored samples and the boundaries of the current camera shutter interval.

Definition at line 1226 of file sceneDelegate.h.

◆ SampleExtComputationInput() [2/3]

void SampleExtComputationInput ( SdfPath const &  computationId,
TfToken const &  input,
HdTimeSampleArray< VtValue, CAPACITY > *  sa 
)

Convenience form of SampleExtComputationInput() that takes an HdTimeSampleArray.

Returns the union of the authored samples and the boundaries of the current camera shutter interval.

Definition at line 1204 of file sceneDelegate.h.

◆ SampleExtComputationInput() [3/3]

virtual HD_API size_t SampleExtComputationInput ( SdfPath const &  computationId,
TfToken const &  input,
size_t  maxSampleCount,
float *  sampleTimes,
VtValue sampleValues 
)
virtual

Return up to maxSampleCount samples for a given computation id and input token.

The token may be a computation input or a computation config parameter. Returns the union of the authored samples and the boundaries of the current camera shutter interval. If this number is greater than maxSampleCount, you might want to call this function again to get all the authored data.

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ SampleIndexedPrimvar() [1/3]

void SampleIndexedPrimvar ( SdfPath const &  id,
TfToken const &  key,
float  startTime,
float  endTime,
HdIndexedTimeSampleArray< VtValue, CAPACITY > *  sa 
)

Convenience form of SampleIndexedPrimvar() that takes HdTimeSampleArrays.

This function returns the union of the authored samples and the boundaries of the current camera shutter interval.

Definition at line 1168 of file sceneDelegate.h.

◆ SampleIndexedPrimvar() [2/3]

void SampleIndexedPrimvar ( SdfPath const &  id,
TfToken const &  key,
HdIndexedTimeSampleArray< VtValue, CAPACITY > *  sa 
)

Convenience form of SampleIndexedPrimvar() that takes HdTimeSampleArrays.

This function returns the union of the authored samples and the boundaries of the current camera shutter interval.

Definition at line 1138 of file sceneDelegate.h.

◆ SampleIndexedPrimvar() [3/3]

virtual HD_API size_t SampleIndexedPrimvar ( SdfPath const &  id,
TfToken const &  key,
size_t  maxSampleCount,
float *  sampleTimes,
VtValue sampleValues,
VtIntArray *  sampleIndices 
)
virtual

SamplePrimvar() for getting an unflattened primvar and its indices.

If *sampleIndices is not nullptr and the primvar has indices, it will return unflattened primvar samples in *sampleValues and the primvar's sampled indices in *sampleIndices, clearing the *sampleIndices array if the primvar is not indexed.

Reimplemented in UsdImagingDelegate, and HdSceneIndexAdapterSceneDelegate.

◆ SampleInstancerTransform() [1/3]

void SampleInstancerTransform ( SdfPath const &  instancerId,
float  startTime,
float  endTime,
HdTimeSampleArray< GfMatrix4d, CAPACITY > *  sa 
)

Convenience form of SampleInstancerTransform() that takes an HdTimeSampleArray.

This function returns the union of the authored samples and the boundaries of the current camera shutter interval.

Definition at line 1045 of file sceneDelegate.h.

◆ SampleInstancerTransform() [2/3]

void SampleInstancerTransform ( SdfPath const &  instancerId,
HdTimeSampleArray< GfMatrix4d, CAPACITY > *  sa 
)

Convenience form of SampleInstancerTransform() that takes an HdTimeSampleArray.

This function returns the union of the authored samples and the boundaries of the current camera shutter interval.

Definition at line 1019 of file sceneDelegate.h.

◆ SampleInstancerTransform() [3/3]

virtual HD_API size_t SampleInstancerTransform ( SdfPath const &  instancerId,
size_t  maxSampleCount,
float *  sampleTimes,
GfMatrix4d sampleValues 
)
virtual

Store up to maxSampleCount transform samples in *sampleValues.

Returns the union of the authored samples and the boundaries of the current camera shutter interval. If this number is greater than maxSampleCount, you might want to call this function again to get all the authored data. Sample times are relative to the scene delegate's current time.

See also
GetInstancerTransform()

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.

◆ SamplePrimvar() [1/3]

void SamplePrimvar ( SdfPath const &  id,
TfToken const &  key,
float  startTime,
float  endTime,
HdTimeSampleArray< VtValue, CAPACITY > *  sa 
)

Convenience form of SamplePrimvar() that takes an HdTimeSampleArray.

This function returns the union of the authored samples and the boundaries of the current camera shutter interval.

Definition at line 1104 of file sceneDelegate.h.

◆ SamplePrimvar() [2/3]

void SamplePrimvar ( SdfPath const &  id,
TfToken const &  key,
HdTimeSampleArray< VtValue, CAPACITY > *  sa 
)

Convenience form of SamplePrimvar() that takes an HdTimeSampleArray.

This function returns the union of the authored samples and the boundaries of the current camera shutter interval.

Definition at line 1076 of file sceneDelegate.h.

◆ SamplePrimvar() [3/3]

virtual HD_API size_t SamplePrimvar ( SdfPath const &  id,
TfToken const &  key,
size_t  maxSampleCount,
float *  sampleTimes,
VtValue sampleValues 
)
virtual

Store up to maxSampleCount primvar samples in *samplesValues.

Returns the union of the authored samples and the boundaries of the current camera shutter interval. If this number is greater than maxSampleCount, you might want to call this function again to get all the authored data.

Sample values that are array-valued will have a size described by the HdPrimvarDescriptor as applied to the toplogy.

For example, this means that a mesh that is fracturing over time will return samples with the same number of points; the number of points will change as the scene delegate is resynchronized to represent the scene at a time with different topology.

Sample times are relative to the scene delegate's current time.

See also
Get()

Reimplemented in UsdImagingDelegate, and HdSceneIndexAdapterSceneDelegate.

◆ SampleTransform() [1/3]

void SampleTransform ( SdfPath const &  id,
float  startTime,
float  endTime,
HdTimeSampleArray< GfMatrix4d, CAPACITY > *  sa 
)

Convenience form of SampleTransform() that takes an HdTimeSampleArray.

This function returns the union of the authored transform samples and the boundaries of the current camera shutter interval.

Definition at line 993 of file sceneDelegate.h.

◆ SampleTransform() [2/3]

void SampleTransform ( SdfPath const &  id,
HdTimeSampleArray< GfMatrix4d, CAPACITY > *  sa 
)

Convenience form of SampleTransform() that takes an HdTimeSampleArray.

This function returns the union of the authored transform samples and the boundaries of the current camera shutter interval.

Definition at line 972 of file sceneDelegate.h.

◆ SampleTransform() [3/3]

virtual HD_API size_t SampleTransform ( SdfPath const &  id,
size_t  maxSampleCount,
float *  sampleTimes,
GfMatrix4d sampleValues 
)
virtual

Store up to maxSampleCount transform samples in *sampleValues.

Returns the union of the authored samples and the boundaries of the current camera shutter interval. If this number is greater than maxSampleCount, you might want to call this function again to get all the authored data. Sample times are relative to the scene delegate's current time.

See also
GetTransform()

Reimplemented in UsdImagingDelegate, and HdSceneIndexAdapterSceneDelegate.

◆ Sync()

virtual HD_API void Sync ( HdSyncRequestVector request)
virtual

Synchronizes the delegate state for the given request vector.

Reimplemented in HdSceneIndexAdapterSceneDelegate, and UsdImagingDelegate.


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