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
HdSceneIndexAdapterSceneDelegate Class Reference

Scene delegate which observes notices from an HdSceneIndex and applies them to an HdRenderIndex. More...

#include <sceneIndexAdapterSceneDelegate.h>

+ Inheritance diagram for HdSceneIndexAdapterSceneDelegate:

Public Member Functions

 HdSceneIndexAdapterSceneDelegate (HdSceneIndexBaseRefPtr inputSceneIndex, HdRenderIndex *parentIndex, SdfPath const &delegateID)
 
void PrimsAdded (const HdSceneIndexBase &sender, const AddedPrimEntries &entries) override
 A notification indicating prims have been added to the scene.
 
void PrimsRemoved (const HdSceneIndexBase &sender, const RemovedPrimEntries &entries) override
 A notification indicating prims have been removed from the scene.
 
void PrimsDirtied (const HdSceneIndexBase &sender, const DirtiedPrimEntries &entries) override
 A notification indicating prim datasources have been invalidated.
 
void PrimsRenamed (const HdSceneIndexBase &sender, const RenamedPrimEntries &entries) override
 A notification indicating prims (and their descendants) have been renamed or reparented.
 
HdMeshTopology GetMeshTopology (SdfPath const &id) override
 Gets the topological mesh data for a given prim.
 
HdBasisCurvesTopology GetBasisCurvesTopology (SdfPath const &id) override
 Gets the topological curve data for a given prim.
 
PxOsdSubdivTags GetSubdivTags (SdfPath const &id) override
 Gets the subdivision surface tags (sharpness, holes, etc).
 
GfRange3d GetExtent (SdfPath const &id) override
 Gets the axis aligned bounds of a prim.
 
bool GetVisible (SdfPath const &id) override
 Returns the authored visible state of the prim.
 
bool GetDoubleSided (SdfPath const &id) override
 Returns the doubleSided state for the given prim.
 
HdCullStyle GetCullStyle (SdfPath const &id) override
 Returns the cullstyle for the given prim.
 
VtValue GetShadingStyle (SdfPath const &id) override
 Returns the shading style for the given prim.
 
HdDisplayStyle GetDisplayStyle (SdfPath const &id) override
 Returns the refinement level for the given prim in the range [0,8].
 
HdReprSelector GetReprSelector (SdfPath const &id) override
 Returns the authored repr (if any) for the given prim.
 
TfToken GetRenderTag (SdfPath const &id) override
 Returns the render tag that will be used to bucket prims during render pass bucketing.
 
VtArray< TfTokenGetCategories (SdfPath const &id) override
 Returns the prim categories.
 
HdVolumeFieldDescriptorVector GetVolumeFieldDescriptors (SdfPath const &volumeId) override
 
GfMatrix4d GetTransform (SdfPath const &id) override
 Returns the object space transform, including all parent transforms.
 
size_t SampleTransform (SdfPath const &id, size_t maxSampleCount, float *sampleTimes, GfMatrix4d *sampleValues) override
 Store up to maxSampleCount transform samples in *sampleValues.
 
size_t SampleTransform (SdfPath const &id, float startTime, float endTime, size_t maxSampleCount, float *sampleTimes, GfMatrix4d *sampleValues) override
 
GfMatrix4d GetInstancerTransform (SdfPath const &instancerId) override
 Returns the instancer transform.
 
size_t SampleInstancerTransform (SdfPath const &instancerId, size_t maxSampleCount, float *sampleTimes, GfMatrix4d *sampleValues) override
 Store up to maxSampleCount transform samples in *sampleValues.
 
size_t SampleInstancerTransform (SdfPath const &instancerId, float startTime, float endTime, size_t maxSampleCount, float *sampleTimes, GfMatrix4d *sampleValues) override
 
HdPrimvarDescriptorVector GetPrimvarDescriptors (SdfPath const &id, HdInterpolation interpolation) override
 Returns descriptors for all primvars of the given interpolation type.
 
VtValue Get (SdfPath const &id, TfToken const &key) override
 Returns a named value.
 
VtValue GetIndexedPrimvar (SdfPath const &id, TfToken const &key, VtIntArray *outIndices) override
 Returns a named primvar value.
 
size_t SamplePrimvar (SdfPath const &id, TfToken const &key, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues) override
 Store up to maxSampleCount primvar samples in *samplesValues.
 
size_t SamplePrimvar (SdfPath const &id, TfToken const &key, float startTime, float endTime, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues) override
 
size_t SampleIndexedPrimvar (SdfPath const &id, TfToken const &key, size_t maxNumSamples, float *times, VtValue *samples, VtIntArray *sampleIndices) override
 SamplePrimvar() for getting an unflattened primvar and its indices.
 
size_t SampleIndexedPrimvar (SdfPath const &id, TfToken const &key, float startTime, float endTime, size_t maxNumSamples, float *times, VtValue *samples, VtIntArray *sampleIndices) override
 
std::vector< VtArray< TfToken > > GetInstanceCategories (SdfPath const &instancerId) override
 Returns the categories for each of the instances in the instancer.
 
VtIntArray GetInstanceIndices (SdfPath const &instancerId, SdfPath const &prototypeId) override
 Gets the extracted indices array of the prototype id used in the instancer.
 
SdfPath GetInstancerId (SdfPath const &primId) override
 Returns the parent instancer of the given rprim or instancer.
 
SdfPathVector GetInstancerPrototypes (SdfPath const &instancerId) override
 Returns a list of prototypes of this instancer.
 
SdfPath GetMaterialId (SdfPath const &id) override
 Returns the material ID bound to the rprim rprimId.
 
VtValue GetMaterialResource (SdfPath const &id) override
 
HdIdVectorSharedPtr GetCoordSysBindings (SdfPath const &id) override
 Returns the coordinate system bindings, or a nullptr if none are bound.
 
HdRenderBufferDescriptor GetRenderBufferDescriptor (SdfPath const &id) override
 Returns the allocation descriptor for a given render buffer prim.
 
VtValue GetLightParamValue (SdfPath const &id, TfToken const &paramName) override
 
VtValue GetCameraParamValue (SdfPath const &cameraId, TfToken const &paramName) override
 Returns a single value for a given camera and parameter.
 
HdExtComputationPrimvarDescriptorVector GetExtComputationPrimvarDescriptors (SdfPath const &id, HdInterpolation interpolationMode) override
 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.
 
TfTokenVector GetExtComputationSceneInputNames (SdfPath const &computationId) override
 For the given computation id, returns a list of inputs which will be requested from the scene delegate using the Get() method.
 
VtValue GetExtComputationInput (SdfPath const &computationId, TfToken const &input) override
 Returns a single value for a given computation id and input token.
 
size_t SampleExtComputationInput (SdfPath const &computationId, TfToken const &input, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues) override
 Return up to maxSampleCount samples for a given computation id and input token.
 
size_t SampleExtComputationInput (SdfPath const &computationId, TfToken const &input, float startTime, float endTime, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues) override
 
HdExtComputationInputDescriptorVector GetExtComputationInputDescriptors (SdfPath const &computationId) override
 For the given computation id, returns a list of computation input descriptors.
 
HdExtComputationOutputDescriptorVector GetExtComputationOutputDescriptors (SdfPath const &computationId) override
 For the given computation id, returns a list of computation output descriptors.
 
std::string GetExtComputationKernel (SdfPath const &computationId) override
 Returns the kernel source assigned to the computation at the path id.
 
void InvokeExtComputation (SdfPath const &computationId, HdExtComputationContext *context) override
 Requests the scene delegate run the ExtComputation with the given id.
 
TfTokenVector GetTaskRenderTags (SdfPath const &taskId) override
 
void Sync (HdSyncRequestVector *request) override
 Synchronizes the delegate state for the given request vector.
 
void PostSyncCleanup () override
 Opportunity for the delegate to clean itself up after performing parallel work during sync phase.
 
- Public Member Functions inherited from HdSceneDelegate
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.
 
virtual HD_API bool IsEnabled (TfToken const &option) const
 Returns true if the named option is enabled by the delegate.
 
virtual HD_API HdModelDrawMode GetModelDrawMode (SdfPath const &id)
 Returns the model draw mode object for the given prim.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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 void PrimsAdded (const HdSceneIndexBase &sender, const AddedPrimEntries &entries)=0
 A notification indicating prims have been added to the scene.
 
virtual HD_API void PrimsRemoved (const HdSceneIndexBase &sender, const RemovedPrimEntries &entries)=0
 A notification indicating prims have been removed from the scene.
 
virtual HD_API void PrimsDirtied (const HdSceneIndexBase &sender, const DirtiedPrimEntries &entries)=0
 A notification indicating prim datasources have been invalidated.
 
virtual HD_API void PrimsRenamed (const HdSceneIndexBase &sender, const RenamedPrimEntries &entries)=0
 A notification indicating prims (and their descendants) have been renamed or reparented.
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Static Public Member Functions

static HdSceneIndexBaseRefPtr AppendDefaultSceneFilters (HdSceneIndexBaseRefPtr inputSceneIndex, SdfPath const &delegateID)
 Returns the end of a scene index chain containing the filters necessary for input to an instance of this scene delegate.
 
- Static Public Member Functions inherited from HdSceneIndexObserver
static HD_API void ConvertPrimsRenamedToRemovedAndAdded (const HdSceneIndexBase &sender, const HdSceneIndexObserver::RenamedPrimEntries &renamedEntries, HdSceneIndexObserver::RemovedPrimEntries *outputRemovedEntries, HdSceneIndexObserver::AddedPrimEntries *outputAddedEntries)
 A utility for converting prims renamed messages into equivalent removed and added notices.
 
static HD_API void ConvertPrimsRenamedToRemovedAndAdded (const HdSceneIndexBase &sender, const HdSceneIndexObserver::RenamedPrimEntries &renamedEntries, HdSceneIndexObserver *observer)
 A utility for converting prims renamed messages into equivalent removed and added notices at the observer level.
 

Additional Inherited Members

- Public Types inherited from HdSceneIndexObserver
using AddedPrimEntries = TfSmallVector< AddedPrimEntry, 16 >
 
using RemovedPrimEntries = TfSmallVector< RemovedPrimEntry, 16 >
 
using DirtiedPrimEntries = TfSmallVector< DirtiedPrimEntry, 16 >
 
using RenamedPrimEntries = TfSmallVector< RenamedPrimEntry, 16 >
 
- Protected Member Functions inherited from TfWeakBase
TfRefPtr< Tf_Remnant > _Register () const
 
template<class T >
TfRefPtr< Tf_Remnant > _Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

Scene delegate which observes notices from an HdSceneIndex and applies them to an HdRenderIndex.

This serves as "back-end" emulation in order for scenes described via the HdSceneIndex/HdDataSource APIs to be accessible by legacy render delegates.

Definition at line 25 of file sceneIndexAdapterSceneDelegate.h.

Member Function Documentation

◆ AppendDefaultSceneFilters()

static HdSceneIndexBaseRefPtr AppendDefaultSceneFilters ( HdSceneIndexBaseRefPtr  inputSceneIndex,
SdfPath const &  delegateID 
)
static

Returns the end of a scene index chain containing the filters necessary for input to an instance of this scene delegate.

◆ Get()

VtValue Get ( SdfPath const &  id,
TfToken const &  key 
)
overridevirtual

Returns a named value.

Reimplemented from HdSceneDelegate.

◆ GetBasisCurvesTopology()

HdBasisCurvesTopology GetBasisCurvesTopology ( SdfPath const &  id)
overridevirtual

Gets the topological curve data for a given prim.

Reimplemented from HdSceneDelegate.

◆ GetCameraParamValue()

VtValue GetCameraParamValue ( SdfPath const &  cameraId,
TfToken const &  paramName 
)
overridevirtual

Returns a single value for a given camera and parameter.

See HdCameraTokens for the list of paramters.

Reimplemented from HdSceneDelegate.

◆ GetCategories()

VtArray< TfToken > GetCategories ( SdfPath const &  id)
overridevirtual

Returns the prim categories.

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

Reimplemented from HdSceneDelegate.

◆ GetCoordSysBindings()

HdIdVectorSharedPtr GetCoordSysBindings ( SdfPath const &  id)
overridevirtual

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

Reimplemented from HdSceneDelegate.

◆ GetCullStyle()

HdCullStyle GetCullStyle ( SdfPath const &  id)
overridevirtual

Returns the cullstyle for the given prim.

Reimplemented from HdSceneDelegate.

◆ GetDisplayStyle()

HdDisplayStyle GetDisplayStyle ( SdfPath const &  id)
overridevirtual

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 from HdSceneDelegate.

◆ GetDoubleSided()

bool GetDoubleSided ( SdfPath const &  id)
overridevirtual

Returns the doubleSided state for the given prim.

Reimplemented from HdSceneDelegate.

◆ GetExtComputationInput()

VtValue GetExtComputationInput ( SdfPath const &  computationId,
TfToken const &  input 
)
overridevirtual

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 from HdSceneDelegate.

◆ GetExtComputationInputDescriptors()

HdExtComputationInputDescriptorVector GetExtComputationInputDescriptors ( SdfPath const &  computationId)
overridevirtual

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

See HdExtComputationInputDecriptor

Reimplemented from HdSceneDelegate.

◆ GetExtComputationKernel()

std::string GetExtComputationKernel ( SdfPath const &  computationId)
overridevirtual

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 from HdSceneDelegate.

◆ GetExtComputationOutputDescriptors()

HdExtComputationOutputDescriptorVector GetExtComputationOutputDescriptors ( SdfPath const &  computationId)
overridevirtual

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

See HdExtComputationOutputDescriptor

Reimplemented from HdSceneDelegate.

◆ GetExtComputationPrimvarDescriptors()

HdExtComputationPrimvarDescriptorVector GetExtComputationPrimvarDescriptors ( SdfPath const &  id,
HdInterpolation  interpolationMode 
)
overridevirtual

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 from HdSceneDelegate.

◆ GetExtComputationSceneInputNames()

TfTokenVector GetExtComputationSceneInputNames ( SdfPath const &  computationId)
overridevirtual

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 from HdSceneDelegate.

◆ GetExtent()

GfRange3d GetExtent ( SdfPath const &  id)
overridevirtual

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 from HdSceneDelegate.

◆ GetIndexedPrimvar()

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

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 from HdSceneDelegate.

◆ GetInstanceCategories()

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

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

Reimplemented from HdSceneDelegate.

◆ GetInstanceIndices()

VtIntArray GetInstanceIndices ( SdfPath const &  instancerId,
SdfPath const &  prototypeId 
)
overridevirtual

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 from HdSceneDelegate.

◆ GetInstancerId()

SdfPath GetInstancerId ( SdfPath const &  primId)
overridevirtual

Returns the parent instancer of the given rprim or instancer.

Reimplemented from HdSceneDelegate.

◆ GetInstancerPrototypes()

SdfPathVector GetInstancerPrototypes ( SdfPath const &  instancerId)
overridevirtual

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 from HdSceneDelegate.

◆ GetInstancerTransform()

GfMatrix4d GetInstancerTransform ( SdfPath const &  instancerId)
overridevirtual

Returns the instancer transform.

Reimplemented from HdSceneDelegate.

◆ GetLightParamValue()

VtValue GetLightParamValue ( SdfPath const &  id,
TfToken const &  paramName 
)
overridevirtual

Reimplemented from HdSceneDelegate.

◆ GetMaterialId()

SdfPath GetMaterialId ( SdfPath const &  rprimId)
overridevirtual

Returns the material ID bound to the rprim rprimId.

Reimplemented from HdSceneDelegate.

◆ GetMaterialResource()

VtValue GetMaterialResource ( SdfPath const &  id)
overridevirtual

Reimplemented from HdSceneDelegate.

◆ GetMeshTopology()

HdMeshTopology GetMeshTopology ( SdfPath const &  id)
overridevirtual

Gets the topological mesh data for a given prim.

Reimplemented from HdSceneDelegate.

◆ GetPrimvarDescriptors()

HdPrimvarDescriptorVector GetPrimvarDescriptors ( SdfPath const &  id,
HdInterpolation  interpolation 
)
overridevirtual

Returns descriptors for all primvars of the given interpolation type.

Reimplemented from HdSceneDelegate.

◆ GetRenderBufferDescriptor()

HdRenderBufferDescriptor GetRenderBufferDescriptor ( SdfPath const &  id)
overridevirtual

Returns the allocation descriptor for a given render buffer prim.

Reimplemented from HdSceneDelegate.

◆ GetRenderTag()

TfToken GetRenderTag ( SdfPath const &  id)
overridevirtual

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

Reimplemented from HdSceneDelegate.

◆ GetReprSelector()

HdReprSelector GetReprSelector ( SdfPath const &  id)
overridevirtual

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

Reimplemented from HdSceneDelegate.

◆ GetShadingStyle()

VtValue GetShadingStyle ( SdfPath const &  id)
overridevirtual

Returns the shading style for the given prim.

Reimplemented from HdSceneDelegate.

◆ GetSubdivTags()

PxOsdSubdivTags GetSubdivTags ( SdfPath const &  id)
overridevirtual

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

Reimplemented from HdSceneDelegate.

◆ GetTaskRenderTags()

TfTokenVector GetTaskRenderTags ( SdfPath const &  taskId)
overridevirtual

Reimplemented from HdSceneDelegate.

◆ GetTransform()

GfMatrix4d GetTransform ( SdfPath const &  id)
overridevirtual

Returns the object space transform, including all parent transforms.

Reimplemented from HdSceneDelegate.

◆ GetVisible()

bool GetVisible ( SdfPath const &  id)
overridevirtual

Returns the authored visible state of the prim.

Reimplemented from HdSceneDelegate.

◆ GetVolumeFieldDescriptors()

HdVolumeFieldDescriptorVector GetVolumeFieldDescriptors ( SdfPath const &  volumeId)
overridevirtual

Reimplemented from HdSceneDelegate.

◆ InvokeExtComputation()

void InvokeExtComputation ( SdfPath const &  computationId,
HdExtComputationContext context 
)
overridevirtual

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 from HdSceneDelegate.

◆ PostSyncCleanup()

void PostSyncCleanup ( )
overridevirtual

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

Reimplemented from HdSceneDelegate.

◆ PrimsAdded()

void PrimsAdded ( const HdSceneIndexBase sender,
const AddedPrimEntries entries 
)
overridevirtual

A notification indicating prims have been added to the scene.

The set of scene prims compiled from added/removed notices should match the set from a traversal based on sender.GetChildPrimNames. Each prim has a path and type. It's possible for PrimsAdded to be called for prims that already exist; in that case, observers should be sure to update the prim type, in case it changed, and resync the prim. This function is not expected to be threadsafe.

Implements HdSceneIndexObserver.

◆ PrimsDirtied()

void PrimsDirtied ( const HdSceneIndexBase sender,
const DirtiedPrimEntries entries 
)
overridevirtual

A notification indicating prim datasources have been invalidated.

This message is not considered hierarchical on primPath; if /Path is dirtied, /Path/child is not necessarily dirtied. However datasource locators are considered hierarchical: if primvars is dirtied on a prim, primvars/color is considered dirtied as well. This function is not expected to be threadsafe.

Implements HdSceneIndexObserver.

◆ PrimsRemoved()

void PrimsRemoved ( const HdSceneIndexBase sender,
const RemovedPrimEntries entries 
)
overridevirtual

A notification indicating prims have been removed from the scene.

Note that this message is considered hierarchical; if /Path is removed, /Path/child is considered removed as well. This function is not expected to be threadsafe.

Implements HdSceneIndexObserver.

◆ PrimsRenamed()

void PrimsRenamed ( const HdSceneIndexBase sender,
const RenamedPrimEntries entries 
)
overridevirtual

A notification indicating prims (and their descendants) have been renamed or reparented.

This function is not expected to be threadsafe.

Implements HdSceneIndexObserver.

◆ SampleExtComputationInput() [1/2]

size_t SampleExtComputationInput ( SdfPath const &  computationId,
TfToken const &  input,
float  startTime,
float  endTime,
size_t  maxSampleCount,
float *  sampleTimes,
VtValue sampleValues 
)
overridevirtual

Reimplemented from HdSceneDelegate.

◆ SampleExtComputationInput() [2/2]

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

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 from HdSceneDelegate.

◆ SampleIndexedPrimvar() [1/2]

size_t SampleIndexedPrimvar ( SdfPath const &  id,
TfToken const &  key,
float  startTime,
float  endTime,
size_t  maxNumSamples,
float *  times,
VtValue samples,
VtIntArray *  sampleIndices 
)
overridevirtual

Reimplemented from HdSceneDelegate.

◆ SampleIndexedPrimvar() [2/2]

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

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 from HdSceneDelegate.

◆ SampleInstancerTransform() [1/2]

size_t SampleInstancerTransform ( SdfPath const &  instancerId,
float  startTime,
float  endTime,
size_t  maxSampleCount,
float *  sampleTimes,
GfMatrix4d sampleValues 
)
overridevirtual

Reimplemented from HdSceneDelegate.

◆ SampleInstancerTransform() [2/2]

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

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 from HdSceneDelegate.

◆ SamplePrimvar() [1/2]

size_t SamplePrimvar ( SdfPath const &  id,
TfToken const &  key,
float  startTime,
float  endTime,
size_t  maxSampleCount,
float *  sampleTimes,
VtValue sampleValues 
)
overridevirtual

Reimplemented from HdSceneDelegate.

◆ SamplePrimvar() [2/2]

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

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 from HdSceneDelegate.

◆ SampleTransform() [1/2]

size_t SampleTransform ( SdfPath const &  id,
float  startTime,
float  endTime,
size_t  maxSampleCount,
float *  sampleTimes,
GfMatrix4d sampleValues 
)
overridevirtual

Reimplemented from HdSceneDelegate.

◆ SampleTransform() [2/2]

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

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 from HdSceneDelegate.

◆ Sync()

void Sync ( HdSyncRequestVector request)
overridevirtual

Synchronizes the delegate state for the given request vector.

Reimplemented from HdSceneDelegate.


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