|
The primary translation layer between the Hydra (Hd) core and the Usd scene graph. More...
#include <delegate.h>
Public Types | |
typedef TfHashMap< SdfPath, GfMatrix4d, SdfPath::Hash > | RigidXformOverridesMap |
typedef PxOsdSubdivTags | SubdivTags |
Public Member Functions | |
USDIMAGING_API | UsdImagingDelegate (HdRenderIndex *parentIndex, SdfPath const &delegateID) |
virtual USDIMAGING_API void | Sync (HdSyncRequestVector *request) override |
Synchronizes the delegate state for the given request vector. | |
USDIMAGING_API void | SyncAll (bool includeUnvarying) |
USDIMAGING_API void | Populate (UsdPrim const &rootPrim) |
Populates the rootPrim in the HdRenderIndex. | |
USDIMAGING_API void | Populate (UsdPrim const &rootPrim, SdfPathVector const &excludedPrimPaths, SdfPathVector const &invisedPrimPaths=SdfPathVector()) |
Populates the rootPrim in the HdRenderIndex, excluding all paths in the excludedPrimPaths , as well as their prim children. | |
USDIMAGING_API void | SetTime (UsdTimeCode time) |
Sets the current time from which data will be read by the delegate. | |
UsdTimeCode | GetTime () const |
Returns the current time. | |
UsdTimeCode | GetTimeWithOffset (float offset) const |
Apply a relative offset to the current time. | |
USDIMAGING_API void | ApplyPendingUpdates () |
Applies any scene edits which have been queued up by notices from USD. | |
int | GetRefineLevelFallback () const |
Returns the refinement level that is used when prims have no explicit level set. | |
USDIMAGING_API void | SetRefineLevelFallback (int level) |
Sets the fallback refinement level to level , triggers dirty refine level bit to be set on all Rprims that don't have explicit refine levels set. | |
USDIMAGING_API void | ClearRefineLevel (SdfPath const &usdPath) |
Removes any explicit refine level set for the given USD prim. | |
USDIMAGING_API void | SetRefineLevel (SdfPath const &usdPath, int level) |
Sets an explicit refinement level for the given USD prim. | |
HdReprSelector | GetReprFallback () const |
Returns the fallback repr name. | |
USDIMAGING_API void | SetReprFallback (HdReprSelector const &repr) |
Sets the fallback repr name. | |
HdCullStyle | GetCullStyleFallback () const |
Returns the fallback cull style. | |
USDIMAGING_API void | SetCullStyleFallback (HdCullStyle cullStyle) |
Sets the fallback cull style. | |
USDIMAGING_API void | SetRootTransform (GfMatrix4d const &xf) |
Sets the root transform for the entire delegate, which is applied to all render prims generated. | |
const GfMatrix4d & | GetRootTransform () const |
Returns the root transform for the entire delegate. | |
USDIMAGING_API void | SetRootVisibility (bool isVisible) |
Sets the root visibility for the entire delegate, which is applied to all render prims generated. | |
bool | GetRootVisibility () const |
Returns the root visibility for the entire delegate. | |
USDIMAGING_API void | SetRootInstancerId (SdfPath const &instancerId) |
Sets the root instancer id for the entire delegate, which is used as a fallback value for GetInstancerId. | |
SdfPath | GetRootInstancerId () const |
Returns the root instancer id for the entire delegate. | |
USDIMAGING_API void | SetInvisedPrimPaths (SdfPathVector const &invisedPaths) |
Set the list of paths that must be invised. | |
USDIMAGING_API void | SetRigidXformOverrides (RigidXformOverridesMap const &overrides) |
Set transform value overrides on a set of paths. | |
USDIMAGING_API void | SetDisplayRender (const bool displayRender) |
Sets display of prims with purpose "render". | |
bool | GetDisplayRender () const |
USDIMAGING_API void | SetDisplayProxy (const bool displayProxy) |
Sets display of prims with purpose "proxy". | |
bool | GetDisplayProxy () const |
USDIMAGING_API void | SetDisplayGuides (const bool displayGuides) |
Sets display of prims with purpose "guide". | |
bool | GetDisplayGuides () const |
USDIMAGING_API void | SetUsdDrawModesEnabled (bool enableUsdDrawModes) |
Returns whether draw modes are enabled. | |
bool | GetUsdDrawModesEnabled () const |
USDIMAGING_API void | SetSceneMaterialsEnabled (bool enable) |
Enables custom shading on prims. | |
USDIMAGING_API void | SetSceneLightsEnabled (bool enable) |
Enables lights found in the usdscene. | |
USDIMAGING_API void | SetWindowPolicy (CameraUtilConformWindowPolicy policy) |
Set the window policy on all scene cameras. | |
USDIMAGING_API void | SetDisplayUnloadedPrimsWithBounds (bool displayUnloaded) |
Sets display of unloaded prims as bounding boxes. | |
bool | GetDisplayUnloadedPrimsWithBounds () const |
USDIMAGING_API void | SetCameraForSampling (SdfPath const &id) |
Setup for the shutter open and close to be used for motion sampling. | |
USDIMAGING_API GfInterval | GetCurrentTimeSamplingInterval () |
Returns the current interval that will be used when using the sample* API in the scene delegate. | |
virtual USDIMAGING_API TfToken | GetRenderTag (SdfPath const &id) override |
Returns the render tag that will be used to bucket prims during render pass bucketing. | |
virtual USDIMAGING_API HdMeshTopology | GetMeshTopology (SdfPath const &id) override |
Gets the topological mesh data for a given prim. | |
virtual USDIMAGING_API HdBasisCurvesTopology | GetBasisCurvesTopology (SdfPath const &id) override |
Gets the topological curve data for a given prim. | |
virtual USDIMAGING_API SubdivTags | GetSubdivTags (SdfPath const &id) override |
Gets the subdivision surface tags (sharpness, holes, etc). | |
virtual USDIMAGING_API GfRange3d | GetExtent (SdfPath const &id) override |
Gets the axis aligned bounds of a prim. | |
virtual USDIMAGING_API GfMatrix4d | GetTransform (SdfPath const &id) override |
Returns the object space transform, including all parent transforms. | |
virtual USDIMAGING_API bool | GetVisible (SdfPath const &id) override |
Returns the authored visible state of the prim. | |
virtual USDIMAGING_API bool | GetDoubleSided (SdfPath const &id) override |
Returns the doubleSided state for the given prim. | |
virtual USDIMAGING_API HdCullStyle | GetCullStyle (SdfPath const &id) override |
Returns the cullstyle for the given prim. | |
virtual USDIMAGING_API HdDisplayStyle | GetDisplayStyle (SdfPath const &id) override |
Gets the explicit display style for the given prim, if no refine level is explicitly set, the fallback is returned; also see GetRefineLevelFallback(). | |
USDIMAGING_API HdModelDrawMode | GetModelDrawMode (SdfPath const &id) override |
Returns the model draw mode object for the given prim. | |
virtual USDIMAGING_API VtValue | Get (SdfPath const &id, TfToken const &key) override |
Returns a named value. | |
virtual USDIMAGING_API VtValue | GetIndexedPrimvar (SdfPath const &id, TfToken const &key, VtIntArray *outIndices) override |
Returns a named primvar value. | |
USDIMAGING_API virtual HdIdVectorSharedPtr | GetCoordSysBindings (SdfPath const &id) override |
Returns the coordinate system bindings, or a nullptr if none are bound. | |
virtual USDIMAGING_API HdReprSelector | GetReprSelector (SdfPath const &id) override |
Returns the authored repr (if any) for the given prim. | |
virtual USDIMAGING_API VtArray< TfToken > | GetCategories (SdfPath const &id) override |
Returns the prim categories. | |
virtual USDIMAGING_API std::vector< VtArray< TfToken > > | GetInstanceCategories (SdfPath const &instancerId) override |
Returns the categories for each of the instances in the instancer. | |
virtual USDIMAGING_API HdPrimvarDescriptorVector | GetPrimvarDescriptors (SdfPath const &id, HdInterpolation interpolation) override |
Returns descriptors for all primvars of the given interpolation type. | |
virtual USDIMAGING_API VtIntArray | GetInstanceIndices (SdfPath const &instancerId, SdfPath const &prototypeId) override |
Gets the extracted indices array of the prototype id used in the instancer. | |
virtual USDIMAGING_API GfMatrix4d | GetInstancerTransform (SdfPath const &instancerId) override |
Returns the instancer transform. | |
virtual USDIMAGING_API SdfPath | GetInstancerId (SdfPath const &primId) override |
Returns the parent instancer of the given rprim or instancer. | |
virtual USDIMAGING_API SdfPathVector | GetInstancerPrototypes (SdfPath const &instancerId) override |
Returns a list of prototypes of this instancer. | |
virtual USDIMAGING_API size_t | SampleTransform (SdfPath const &id, size_t maxNumSamples, float *times, GfMatrix4d *samples) override |
Store up to maxSampleCount transform samples in *sampleValues. | |
virtual USDIMAGING_API size_t | SampleInstancerTransform (SdfPath const &instancerId, size_t maxSampleCount, float *times, GfMatrix4d *samples) override |
Store up to maxSampleCount transform samples in *sampleValues. | |
virtual USDIMAGING_API size_t | SamplePrimvar (SdfPath const &id, TfToken const &key, size_t maxNumSamples, float *times, VtValue *samples) override |
Store up to maxSampleCount primvar samples in *samplesValues. | |
virtual USDIMAGING_API size_t | SampleIndexedPrimvar (SdfPath const &id, TfToken const &key, size_t maxNumSamples, float *times, VtValue *samples, VtIntArray *indices) override |
SamplePrimvar() for getting an unflattened primvar and its indices. | |
virtual USDIMAGING_API SdfPath | GetMaterialId (SdfPath const &rprimId) override |
Returns the material ID bound to the rprim rprimId . | |
virtual USDIMAGING_API VtValue | GetMaterialResource (SdfPath const &materialId) override |
virtual USDIMAGING_API VtValue | GetLightParamValue (SdfPath const &id, TfToken const ¶mName) override |
virtual USDIMAGING_API VtValue | GetCameraParamValue (SdfPath const &id, TfToken const ¶mName) override |
Returns a single value for a given camera and parameter. | |
virtual USDIMAGING_API HdVolumeFieldDescriptorVector | GetVolumeFieldDescriptors (SdfPath const &volumeId) override |
virtual USDIMAGING_API SdfPath | GetScenePrimPath (SdfPath const &rprimId, int instanceIndex, HdInstancerContext *instancerContext=nullptr) override |
Returns the scene address of the prim corresponding to the given rprim/instance index. | |
virtual USDIMAGING_API SdfPathVector | GetScenePrimPaths (SdfPath const &rprimId, std::vector< int > instanceIndices, std::vector< HdInstancerContext > *instancerContexts=nullptr) override |
A vectorized version of GetScenePrimPath that allows the prim adapter to amortize expensive calculations across a number of path evaluations in a single call. | |
USDIMAGING_API 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. | |
USDIMAGING_API HdExtComputationInputDescriptorVector | GetExtComputationInputDescriptors (SdfPath const &computationId) override |
For the given computation id, returns a list of computation input descriptors. | |
USDIMAGING_API HdExtComputationOutputDescriptorVector | GetExtComputationOutputDescriptors (SdfPath const &computationId) override |
For the given computation id, returns a list of computation output descriptors. | |
USDIMAGING_API HdExtComputationPrimvarDescriptorVector | GetExtComputationPrimvarDescriptors (SdfPath const &computationId, HdInterpolation interpolation) 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. | |
USDIMAGING_API VtValue | GetExtComputationInput (SdfPath const &computationId, TfToken const &input) override |
Returns a single value for a given computation id and input token. | |
USDIMAGING_API 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. | |
USDIMAGING_API std::string | GetExtComputationKernel (SdfPath const &computationId) override |
Returns the kernel source assigned to the computation at the path id. | |
USDIMAGING_API void | InvokeExtComputation (SdfPath const &computationId, HdExtComputationContext *context) override |
Requests the scene delegate run the ExtComputation with the given id. | |
USDIMAGING_API SdfPath | ConvertCachePathToIndexPath (SdfPath const &cachePath) |
USDIMAGING_API SdfPath | ConvertIndexPathToCachePath (SdfPath const &indexPath) |
Convert the given Hydra ID to a UsdImaging cache path, by stripping the scene delegate prefix. | |
USDIMAGING_API bool | PopulateSelection (HdSelection::HighlightMode const &highlightMode, const SdfPath &usdPath, int instanceIndex, HdSelectionSharedPtr const &result) |
USDIMAGING_API bool | IsInInvisedPaths (const SdfPath &usdPath) const |
Returns true if usdPath is included in invised path list. | |
Public Member Functions inherited from HdSceneDelegate | |
HD_API | HdSceneDelegate (HdRenderIndex *parentIndex, SdfPath const &delegateID) |
Constructor used for nested delegate objects which share a RenderIndex. | |
HdRenderIndex & | GetRenderIndex () |
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 VtValue | GetShadingStyle (SdfPath const &id) |
Returns the shading style for the given prim. | |
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, 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, 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, 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. | |
virtual HD_API HdRenderBufferDescriptor | GetRenderBufferDescriptor (SdfPath const &id) |
Returns the allocation descriptor for a given render buffer prim. | |
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 TfTokenVector | GetTaskRenderTags (SdfPath const &taskId) |
Public Member Functions inherited from TfWeakBase | |
TfWeakBase (const TfWeakBase &) | |
const TfWeakBase & | __GetTfWeakBase__ () const |
const TfWeakBase & | operator= (const TfWeakBase &) |
void | EnableNotification2 () const |
TF_API void const * | GetUniqueIdentifier () const |
Static Public Member Functions | |
static USDIMAGING_API void | SetTimes (const std::vector< UsdImagingDelegate * > &delegates, const std::vector< UsdTimeCode > ×) |
For each delegate in delegates , sets the current time from which data wil be read to the corresponding time in times . | |
Static Public Attributes | |
static constexpr int | ALL_INSTANCES = -1 |
Populate HdxSelection for given path (root) and instanceIndex . | |
Friends | |
class | UsdImagingIndexProxy |
class | UsdImagingPrimAdapter |
Additional Inherited Members | |
Protected Member Functions inherited from TfWeakBase | |
TfRefPtr< Tf_Remnant > | _Register () const |
template<class T > | |
TfRefPtr< Tf_Remnant > | _Register (T *tempRmnt) const |
bool | _HasRemnant () const |
The primary translation layer between the Hydra (Hd) core and the Usd scene graph.
Definition at line 67 of file delegate.h.
typedef TfHashMap<SdfPath, GfMatrix4d, SdfPath::Hash> RigidXformOverridesMap |
Definition at line 71 of file delegate.h.
typedef PxOsdSubdivTags SubdivTags |
Definition at line 274 of file delegate.h.
USDIMAGING_API void ApplyPendingUpdates | ( | ) |
Applies any scene edits which have been queued up by notices from USD.
USDIMAGING_API void ClearRefineLevel | ( | SdfPath const & | usdPath | ) |
Removes any explicit refine level set for the given USD prim.
Marks dirty if a change in level occurs.
Definition at line 438 of file delegate.h.
Convert the given Hydra ID to a UsdImaging cache path, by stripping the scene delegate prefix.
The UsdImaging cache path is the same as a USD prim path, except for instanced prims, which get a name-mangled encoding.
Definition at line 462 of file delegate.h.
Returns a named value.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Gets the topological curve data for a given prim.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns a single value for a given camera and parameter.
See HdCameraTokens for the list of paramters.
Reimplemented from HdSceneDelegate.
Returns the prim categories.
For instancer prims, the categories returned apply to all its instances.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns the coordinate system bindings, or a nullptr if none are bound.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns the cullstyle for the given prim.
Reimplemented from HdSceneDelegate.
|
inline |
Returns the fallback cull style.
Definition at line 168 of file delegate.h.
USDIMAGING_API GfInterval GetCurrentTimeSamplingInterval | ( | ) |
Returns the current interval that will be used when using the sample* API in the scene delegate.
|
inline |
Definition at line 221 of file delegate.h.
|
inline |
Definition at line 216 of file delegate.h.
|
inline |
Definition at line 211 of file delegate.h.
|
overridevirtual |
Gets the explicit display style for the given prim, if no refine level is explicitly set, the fallback is returned; also see GetRefineLevelFallback().
Reimplemented from HdSceneDelegate.
|
inline |
Definition at line 251 of file delegate.h.
|
overridevirtual |
Returns the doubleSided state for the given prim.
Reimplemented from HdSceneDelegate.
|
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.
|
overridevirtual |
For the given computation id, returns a list of computation input descriptors.
See HdExtComputationInputDecriptor
Reimplemented from HdSceneDelegate.
|
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.
|
overridevirtual |
For the given computation id, returns a list of computation output descriptors.
See HdExtComputationOutputDescriptor
Reimplemented from HdSceneDelegate.
|
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.
|
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.
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.
|
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.
|
overridevirtual |
Returns the categories for each of the instances in the instancer.
Reimplemented from HdSceneDelegate.
|
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.
Returns the parent instancer of the given rprim or instancer.
Reimplemented from HdSceneDelegate.
|
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.
|
overridevirtual |
Returns the instancer transform.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Reimplemented from HdSceneDelegate.
Returns the material ID bound to the rprim rprimId
.
Reimplemented from HdSceneDelegate.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Gets the topological mesh data for a given prim.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns the model draw mode object for the given prim.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns descriptors for all primvars of the given interpolation type.
Reimplemented from HdSceneDelegate.
|
inline |
Returns the refinement level that is used when prims have no explicit level set.
The refinement level indicates how many iterations to apply when subdividing subdivision surfaces or other refinable primitives.
Refinement level is always in the range [0,8].
Definition at line 135 of file delegate.h.
Returns the render tag that will be used to bucket prims during render pass bucketing.
Reimplemented from HdSceneDelegate.
|
inline |
Returns the fallback repr name.
Definition at line 160 of file delegate.h.
|
overridevirtual |
Returns the authored repr (if any) for the given prim.
Reimplemented from HdSceneDelegate.
|
inline |
Returns the root instancer id for the entire delegate.
Definition at line 198 of file delegate.h.
|
inline |
Returns the root transform for the entire delegate.
Definition at line 181 of file delegate.h.
|
inline |
Returns the root visibility for the entire delegate.
Definition at line 190 of file delegate.h.
|
overridevirtual |
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.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
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 from HdSceneDelegate.
|
overridevirtual |
Gets the subdivision surface tags (sharpness, holes, etc).
Reimplemented from HdSceneDelegate.
|
inline |
Returns the current time.
Definition at line 118 of file delegate.h.
UsdTimeCode GetTimeWithOffset | ( | float | offset | ) | const |
Apply a relative offset to the current time.
This has no effect in the case of the default USD timecode.
|
overridevirtual |
Returns the object space transform, including all parent transforms.
Reimplemented from HdSceneDelegate.
|
inline |
Definition at line 226 of file delegate.h.
|
overridevirtual |
Returns the authored visible state of the prim.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Reimplemented from HdSceneDelegate.
|
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.
USDIMAGING_API bool IsInInvisedPaths | ( | const SdfPath & | usdPath | ) | const |
Returns true if usdPath
is included in invised path list.
USDIMAGING_API void Populate | ( | UsdPrim const & | rootPrim | ) |
Populates the rootPrim in the HdRenderIndex.
USDIMAGING_API void Populate | ( | UsdPrim const & | rootPrim, |
SdfPathVector const & | excludedPrimPaths, | ||
SdfPathVector const & | invisedPrimPaths = SdfPathVector() |
||
) |
Populates the rootPrim in the HdRenderIndex, excluding all paths in the excludedPrimPaths
, as well as their prim children.
|
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.
|
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.
|
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.
Reimplemented from HdSceneDelegate.
|
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.
Reimplemented from HdSceneDelegate.
|
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.
Reimplemented from HdSceneDelegate.
USDIMAGING_API void SetCameraForSampling | ( | SdfPath const & | id | ) |
Setup for the shutter open and close to be used for motion sampling.
USDIMAGING_API void SetCullStyleFallback | ( | HdCullStyle | cullStyle | ) |
Sets the fallback cull style.
USDIMAGING_API void SetDisplayGuides | ( | const bool | displayGuides | ) |
Sets display of prims with purpose "guide".
USDIMAGING_API void SetDisplayProxy | ( | const bool | displayProxy | ) |
Sets display of prims with purpose "proxy".
USDIMAGING_API void SetDisplayRender | ( | const bool | displayRender | ) |
Sets display of prims with purpose "render".
USDIMAGING_API void SetDisplayUnloadedPrimsWithBounds | ( | bool | displayUnloaded | ) |
Sets display of unloaded prims as bounding boxes.
Unloaded prims will need to satisfy one of the following set of conditions in order to see them:
USDIMAGING_API void SetInvisedPrimPaths | ( | SdfPathVector const & | invisedPaths | ) |
Set the list of paths that must be invised.
USDIMAGING_API void SetRefineLevel | ( | SdfPath const & | usdPath, |
int | level | ||
) |
Sets an explicit refinement level for the given USD prim.
If no level is explicitly set, the fallback is used; see GetRefineLevelFallback(). If setting an explicit level does not change the effective level, no dirty bit is set.
USDIMAGING_API void SetRefineLevelFallback | ( | int | level | ) |
Sets the fallback refinement level to level
, triggers dirty refine level bit to be set on all Rprims that don't have explicit refine levels set.
Level is expected to be in the range [0,8], where 0 indicates no refinement.
USDIMAGING_API void SetReprFallback | ( | HdReprSelector const & | repr | ) |
Sets the fallback repr name.
Note that currently UsdImagingDelegate doesn't support per-prim repr.
USDIMAGING_API void SetRigidXformOverrides | ( | RigidXformOverridesMap const & | overrides | ) |
Set transform value overrides on a set of paths.
USDIMAGING_API void SetRootInstancerId | ( | SdfPath const & | instancerId | ) |
Sets the root instancer id for the entire delegate, which is used as a fallback value for GetInstancerId.
USDIMAGING_API void SetRootTransform | ( | GfMatrix4d const & | xf | ) |
Sets the root transform for the entire delegate, which is applied to all render prims generated.
Setting this value will immediately invalidate existing rprim transforms.
USDIMAGING_API void SetRootVisibility | ( | bool | isVisible | ) |
Sets the root visibility for the entire delegate, which is applied to all render prims generated.
Setting this value will immediately invalidate existing rprim visibility.
USDIMAGING_API void SetSceneLightsEnabled | ( | bool | enable | ) |
Enables lights found in the usdscene.
USDIMAGING_API void SetSceneMaterialsEnabled | ( | bool | enable | ) |
Enables custom shading on prims.
USDIMAGING_API void SetTime | ( | UsdTimeCode | time | ) |
Sets the current time from which data will be read by the delegate.
Changing the current time immediately triggers invalidation in the HdChangeTracker. Redundantly setting the time to its existing value is a no-op and will not trigger invalidation.
|
static |
For each delegate in delegates
, sets the current time from which data wil be read to the corresponding time in times
.
This is equivalent to calling SetTime on each delegate individually. However, this method will try to parallelize certain operations, making it potentially more efficient.
USDIMAGING_API void SetUsdDrawModesEnabled | ( | bool | enableUsdDrawModes | ) |
Returns whether draw modes are enabled.
USDIMAGING_API void SetWindowPolicy | ( | CameraUtilConformWindowPolicy | policy | ) |
Set the window policy on all scene cameras.
This comes from the application.
|
overridevirtual |
Synchronizes the delegate state for the given request vector.
Reimplemented from HdSceneDelegate.
|
friend |
Definition at line 512 of file delegate.h.
|
friend |
Definition at line 513 of file delegate.h.
|
staticconstexpr |
Populate HdxSelection for given path
(root) and instanceIndex
.
If indexPath is an instancer and instanceIndex is ALL_INSTANCES (-1), all instances will be selected.
Note: if usdPath points to a gprim, "instanceIndex" (if provided) is assumed to be the hydra-computed instance index returned from picking code.
If usdPath points to a point instancer, "instanceIndex" is assumed to be the instance of the point instancer to selection highlight (e.g. instance N of the protoIndices array). This would correspond to returning one of the tuples from GetScenePrimPath's "instancerContext".
In any other case, the interpretation of instanceIndex is undefined.
Definition at line 491 of file delegate.h.