HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdImagingDelegate Class Reference

#include <delegate.h>

+ Inheritance diagram for UsdImagingDelegate:

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 ~UsdImagingDelegate ()
 
virtual USDIMAGING_API void Sync (HdSyncRequestVector *request) override
 Synchronizes the delegate state for the given request vector. More...
 
USDIMAGING_API void SyncAll (bool includeUnvarying)
 
USDIMAGING_API void Populate (UsdPrim const &rootPrim)
 Populates the rootPrim in the HdRenderIndex. More...
 
USDIMAGING_API void Populate (UsdPrim const &rootPrim, SdfPathVector const &excludedPrimPaths, SdfPathVector const &invisedPrimPaths=SdfPathVector())
 
USDIMAGING_API void SetTime (UsdTimeCode time)
 
UsdTimeCode GetTime () const
 Returns the current time. More...
 
UsdTimeCode GetTimeWithOffset (float offset) const
 
USDIMAGING_API void ApplyPendingUpdates ()
 Applies any scene edits which have been queued up by notices from USD. More...
 
int GetRefineLevelFallback () const
 
USDIMAGING_API void SetRefineLevelFallback (int level)
 
USDIMAGING_API void ClearRefineLevel (SdfPath const &usdPath)
 
USDIMAGING_API void SetRefineLevel (SdfPath const &usdPath, int level)
 
HdReprSelector GetReprFallback () const
 Returns the fallback repr name. More...
 
USDIMAGING_API void SetReprFallback (HdReprSelector const &repr)
 
HdCullStyle GetCullStyleFallback () const
 Returns the fallback cull style. More...
 
USDIMAGING_API void SetCullStyleFallback (HdCullStyle cullStyle)
 Sets the fallback cull style. More...
 
USDIMAGING_API void SetRootTransform (GfMatrix4d const &xf)
 
const GfMatrix4dGetRootTransform () const
 Returns the root transform for the entire delegate. More...
 
USDIMAGING_API void SetRootVisibility (bool isVisible)
 
bool GetRootVisibility () const
 Returns the root visibility for the entire delegate. More...
 
USDIMAGING_API void SetRootInstancerId (SdfPath const &instancerId)
 
SdfPath GetRootInstancerId () const
 Returns the root instancer id for the entire delegate. More...
 
USDIMAGING_API void SetInvisedPrimPaths (SdfPathVector const &invisedPaths)
 Set the list of paths that must be invised. More...
 
USDIMAGING_API void SetRigidXformOverrides (RigidXformOverridesMap const &overrides)
 Set transform value overrides on a set of paths. More...
 
USDIMAGING_API PickabilityMap GetPickabilityMap () const
 Returns the root paths of pickable objects. More...
 
USDIMAGING_API void SetPickability (SdfPath const &path, bool pickable)
 Sets pickability for a specific path. More...
 
USDIMAGING_API void ClearPickabilityMap ()
 Clears any pickability opinions that this delegates might have. More...
 
USDIMAGING_API void SetDisplayRender (const bool displayRender)
 Sets display of prims with purpose "render". More...
 
bool GetDisplayRender () const
 
USDIMAGING_API void SetDisplayProxy (const bool displayProxy)
 Sets display of prims with purpose "proxy". More...
 
bool GetDisplayProxy () const
 
USDIMAGING_API void SetDisplayGuides (const bool displayGuides)
 Sets display of prims with purpose "guide". More...
 
bool GetDisplayGuides () const
 
USDIMAGING_API void SetUsdDrawModesEnabled (bool enableUsdDrawModes)
 Returns whether draw modes are enabled. More...
 
bool GetUsdDrawModesEnabled () const
 
USDIMAGING_API void SetSceneMaterialsEnabled (bool enable)
 Enables custom shading on prims. More...
 
USDIMAGING_API void SetSceneLightsEnabled (bool enable)
 Enables lights found in the usdscene. More...
 
USDIMAGING_API void SetWindowPolicy (CameraUtilConformWindowPolicy policy)
 
USDIMAGING_API void SetDisplayUnloadedPrimsWithBounds (bool displayUnloaded)
 
bool GetDisplayUnloadedPrimsWithBounds () const
 
USDIMAGING_API void SetCameraForSampling (SdfPath const &id)
 Setup for the shutter open and close to be used for motion sampling. More...
 
USDIMAGING_API GfInterval GetCurrentTimeSamplingInterval ()
 
virtual USDIMAGING_API TfToken GetRenderTag (SdfPath const &id) override
 
virtual USDIMAGING_API
HdMeshTopology 
GetMeshTopology (SdfPath const &id) override
 Gets the topological mesh data for a given prim. More...
 
virtual USDIMAGING_API
HdBasisCurvesTopology 
GetBasisCurvesTopology (SdfPath const &id) override
 Gets the topological curve data for a given prim. More...
 
virtual USDIMAGING_API SubdivTags GetSubdivTags (SdfPath const &id) override
 Gets the subdivision surface tags (sharpness, holes, etc). More...
 
virtual USDIMAGING_API GfRange3d GetExtent (SdfPath const &id) override
 
virtual USDIMAGING_API GfMatrix4d GetTransform (SdfPath const &id) override
 Returns the object space transform, including all parent transforms. More...
 
virtual USDIMAGING_API bool GetVisible (SdfPath const &id) override
 Returns the authored visible state of the prim. More...
 
virtual USDIMAGING_API bool GetDoubleSided (SdfPath const &id) override
 Returns the doubleSided state for the given prim. More...
 
virtual USDIMAGING_API HdCullStyle GetCullStyle (SdfPath const &id) override
 Returns the cullstyle for the given prim. More...
 
virtual USDIMAGING_API
HdDisplayStyle 
GetDisplayStyle (SdfPath const &id) override
 
USDIMAGING_API HdModelDrawMode GetModelDrawMode (SdfPath const &id) override
 Returns the model draw mode object for the given prim. More...
 
virtual USDIMAGING_API VtValue Get (SdfPath const &id, TfToken const &key) override
 Returns a named value. More...
 
virtual USDIMAGING_API VtValue GetIndexedPrimvar (SdfPath const &id, TfToken const &key, VtIntArray *outIndices) override
 
USDIMAGING_API virtual
HdIdVectorSharedPtr 
GetCoordSysBindings (SdfPath const &id) override
 Returns the coordinate system bindings, or a nullptr if none are bound. More...
 
virtual USDIMAGING_API
HdReprSelector 
GetReprSelector (SdfPath const &id) override
 Returns the authored repr (if any) for the given prim. More...
 
virtual USDIMAGING_API VtArray
< TfToken
GetCategories (SdfPath const &id) override
 Returns the prim categories. More...
 
virtual USDIMAGING_API
std::vector< VtArray< TfToken > > 
GetInstanceCategories (SdfPath const &instancerId) override
 Returns the categories for all instances in the instancer. More...
 
virtual USDIMAGING_API
HdPrimvarDescriptorVector 
GetPrimvarDescriptors (SdfPath const &id, HdInterpolation interpolation) override
 Returns descriptors for all primvars of the given interpolation type. More...
 
virtual USDIMAGING_API VtIntArray GetInstanceIndices (SdfPath const &instancerId, SdfPath const &prototypeId) override
 
virtual USDIMAGING_API GfMatrix4d GetInstancerTransform (SdfPath const &instancerId) override
 Returns the instancer transform. More...
 
virtual USDIMAGING_API SdfPath GetInstancerId (SdfPath const &primId) override
 Returns the parent instancer of the given rprim or instancer. More...
 
virtual USDIMAGING_API
SdfPathVector 
GetInstancerPrototypes (SdfPath const &instancerId) override
 
virtual USDIMAGING_API size_t SampleTransform (SdfPath const &id, size_t maxNumSamples, float *times, GfMatrix4d *samples) override
 
virtual USDIMAGING_API size_t SampleInstancerTransform (SdfPath const &instancerId, size_t maxSampleCount, float *times, GfMatrix4d *samples) override
 
virtual USDIMAGING_API size_t SamplePrimvar (SdfPath const &id, TfToken const &key, size_t maxNumSamples, float *times, VtValue *samples) override
 
virtual USDIMAGING_API size_t SampleIndexedPrimvar (SdfPath const &id, TfToken const &key, size_t maxNumSamples, float *times, VtValue *samples, VtIntArray *indices) override
 
virtual USDIMAGING_API SdfPath GetMaterialId (SdfPath const &rprimId) override
 Returns the material ID bound to the rprim rprimId. More...
 
virtual USDIMAGING_API VtValue GetMaterialResource (SdfPath const &materialId) override
 Returns the material ID bound to the rprim rprimId. More...
 
virtual USDIMAGING_API VtValue GetLightParamValue (SdfPath const &id, TfToken const &paramName) override
 
virtual USDIMAGING_API VtValue GetCameraParamValue (SdfPath const &id, TfToken const &paramName) override
 
virtual USDIMAGING_API
HdVolumeFieldDescriptorVector 
GetVolumeFieldDescriptors (SdfPath const &volumeId) override
 
virtual USDIMAGING_API SdfPath GetScenePrimPath (SdfPath const &rprimId, int instanceIndex, HdInstancerContext *instancerContext=nullptr) override
 
virtual USDIMAGING_API
SdfPathVector 
GetScenePrimPaths (SdfPath const &rprimId, std::vector< int > instanceIndices, std::vector< HdInstancerContext > *instancerContexts=nullptr) override
 
virtual SdfPath GetDataSharingId (SdfPath const &primId) override
 
USDIMAGING_API TfTokenVector GetExtComputationSceneInputNames (SdfPath const &computationId) override
 
USDIMAGING_API
HdExtComputationInputDescriptorVector 
GetExtComputationInputDescriptors (SdfPath const &computationId) override
 
USDIMAGING_API
HdExtComputationOutputDescriptorVector 
GetExtComputationOutputDescriptors (SdfPath const &computationId) override
 
USDIMAGING_API
HdExtComputationPrimvarDescriptorVector 
GetExtComputationPrimvarDescriptors (SdfPath const &computationId, HdInterpolation interpolation) override
 
USDIMAGING_API VtValue GetExtComputationInput (SdfPath const &computationId, TfToken const &input) override
 
USDIMAGING_API size_t SampleExtComputationInput (SdfPath const &computationId, TfToken const &input, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues) override
 
USDIMAGING_API std::string GetExtComputationKernel (SdfPath const &computationId) override
 
USDIMAGING_API void InvokeExtComputation (SdfPath const &computationId, HdExtComputationContext *context) override
 
USDIMAGING_API SdfPath ConvertCachePathToIndexPath (SdfPath const &cachePath)
 
USDIMAGING_API SdfPath ConvertIndexPathToCachePath (SdfPath const &indexPath)
 
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. More...
 
- Public Member Functions inherited from HdSceneDelegate
HD_API HdSceneDelegate (HdRenderIndex *parentIndex, SdfPath const &delegateID)
 Constructor used for nested delegate objects which share a RenderIndex. More...
 
virtual HD_API ~HdSceneDelegate ()
 
HdRenderIndexGetRenderIndex ()
 Returns the RenderIndex owned by this delegate. More...
 
SdfPath constGetDelegateID () const
 
virtual HD_API void PostSyncCleanup ()
 
virtual HD_API bool IsEnabled (TfToken const &option) const
 Returns true if the named option is enabled by the delegate. More...
 
virtual HD_API VtValue GetShadingStyle (SdfPath const &id)
 Returns the shading style for the given prim. More...
 
template<unsigned int CAPACITY>
void SampleTransform (SdfPath const &id, HdTimeSampleArray< GfMatrix4d, CAPACITY > *sa)
 
template<unsigned int CAPACITY>
void SampleInstancerTransform (SdfPath const &instancerId, HdTimeSampleArray< GfMatrix4d, CAPACITY > *sa)
 
template<unsigned int CAPACITY>
void SamplePrimvar (SdfPath const &id, TfToken const &key, HdTimeSampleArray< VtValue, CAPACITY > *sa)
 
template<unsigned int CAPACITY>
void SampleIndexedPrimvar (SdfPath const &id, TfToken const &key, HdIndexedTimeSampleArray< VtValue, CAPACITY > *sa)
 
virtual HD_API
HdRenderBufferDescriptor 
GetRenderBufferDescriptor (SdfPath const &id)
 Returns the allocation descriptor for a given render buffer prim. More...
 
template<unsigned int CAPACITY>
void SampleExtComputationInput (SdfPath const &computationId, TfToken const &input, HdTimeSampleArray< VtValue, CAPACITY > *sa)
 
virtual HD_API TfTokenVector GetTaskRenderTags (SdfPath const &taskId)
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase ()
 
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void constGetUniqueIdentifier () const
 

Static Public Member Functions

static USDIMAGING_API void SetTimes (const std::vector< UsdImagingDelegate * > &delegates, const std::vector< UsdTimeCode > &times)
 

Static Public Attributes

static constexpr int ALL_INSTANCES = -1
 

Friends

class UsdImagingIndexProxy
 
class UsdImagingPrimAdapter
 

Additional Inherited Members

- Protected Member Functions inherited from TfWeakBase
 ~TfWeakBase ()
 
TfRefPtr< Tf_Remnant_Register () const
 
template<class T >
TfRefPtr< Tf_Remnant_Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

The primary translation layer between the Hydra (Hd) core and the Usd scene graph.

Definition at line 87 of file delegate.h.

Member Typedef Documentation

Definition at line 306 of file delegate.h.

Constructor & Destructor Documentation

USDIMAGING_API UsdImagingDelegate::UsdImagingDelegate ( HdRenderIndex parentIndex,
SdfPath const delegateID 
)
virtual USDIMAGING_API UsdImagingDelegate::~UsdImagingDelegate ( )
virtual

Member Function Documentation

USDIMAGING_API void UsdImagingDelegate::ApplyPendingUpdates ( )

Applies any scene edits which have been queued up by notices from USD.

USDIMAGING_API void UsdImagingDelegate::ClearPickabilityMap ( )

Clears any pickability opinions that this delegates might have.

USDIMAGING_API void UsdImagingDelegate::ClearRefineLevel ( SdfPath const usdPath)

Removes any explicit refine level set for the given USD prim. Marks dirty if a change in level occurs.

USDIMAGING_API SdfPath UsdImagingDelegate::ConvertCachePathToIndexPath ( SdfPath const cachePath)
inline

Definition at line 472 of file delegate.h.

USDIMAGING_API SdfPath UsdImagingDelegate::ConvertIndexPathToCachePath ( SdfPath const indexPath)
inline

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 496 of file delegate.h.

virtual USDIMAGING_API VtValue UsdImagingDelegate::Get ( SdfPath const id,
TfToken const key 
)
overridevirtual

Returns a named value.

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API HdBasisCurvesTopology UsdImagingDelegate::GetBasisCurvesTopology ( SdfPath const id)
overridevirtual

Gets the topological curve data for a given prim.

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API VtValue UsdImagingDelegate::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.

virtual USDIMAGING_API VtArray<TfToken> UsdImagingDelegate::GetCategories ( SdfPath const id)
overridevirtual

Returns the prim categories.

Reimplemented from HdSceneDelegate.

USDIMAGING_API virtual HdIdVectorSharedPtr UsdImagingDelegate::GetCoordSysBindings ( SdfPath const id)
overridevirtual

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

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API HdCullStyle UsdImagingDelegate::GetCullStyle ( SdfPath const id)
overridevirtual

Returns the cullstyle for the given prim.

Reimplemented from HdSceneDelegate.

HdCullStyle UsdImagingDelegate::GetCullStyleFallback ( ) const
inline

Returns the fallback cull style.

Definition at line 188 of file delegate.h.

USDIMAGING_API GfInterval UsdImagingDelegate::GetCurrentTimeSamplingInterval ( )

Returns the current interval that will be used when using the sample* API in the scene delegate.

virtual SdfPath UsdImagingDelegate::GetDataSharingId ( SdfPath const primId)
overridevirtual

Returns an identifier that can be used to share data between HdPrims during a Sync operation. Any number of HdPrims of the same type may return the same identifier. In this situation, the render delegate can choose to share information between HdPrims rather than fetching data for each HdPrim. For the UsdImagingSceneDelegate, this identifier will be the path of the GetPrototype prim for the UsdPrim correspnding to this HdPrim. Returns an empty SdfPath if this feature is no supported or the UsdPrim has no prototype. Render delegates are free to ignore this method completely if they aren't interested in the additional level of data sharing enabled by this information.

Reimplemented from HdSceneDelegate.

bool UsdImagingDelegate::GetDisplayGuides ( ) const
inline

Definition at line 253 of file delegate.h.

bool UsdImagingDelegate::GetDisplayProxy ( ) const
inline

Definition at line 248 of file delegate.h.

bool UsdImagingDelegate::GetDisplayRender ( ) const
inline

Definition at line 243 of file delegate.h.

virtual USDIMAGING_API HdDisplayStyle UsdImagingDelegate::GetDisplayStyle ( SdfPath const id)
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.

bool UsdImagingDelegate::GetDisplayUnloadedPrimsWithBounds ( ) const
inline

Definition at line 283 of file delegate.h.

virtual USDIMAGING_API bool UsdImagingDelegate::GetDoubleSided ( SdfPath const id)
overridevirtual

Returns the doubleSided state for the given prim.

Reimplemented from HdSceneDelegate.

USDIMAGING_API VtValue UsdImagingDelegate::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.

USDIMAGING_API HdExtComputationInputDescriptorVector UsdImagingDelegate::GetExtComputationInputDescriptors ( SdfPath const computationId)
overridevirtual

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

See HdExtComputationInputDecriptor

Reimplemented from HdSceneDelegate.

USDIMAGING_API std::string UsdImagingDelegate::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.

USDIMAGING_API HdExtComputationOutputDescriptorVector UsdImagingDelegate::GetExtComputationOutputDescriptors ( SdfPath const computationId)
overridevirtual

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

See HdExtComputationOutputDescriptor

Reimplemented from HdSceneDelegate.

USDIMAGING_API HdExtComputationPrimvarDescriptorVector UsdImagingDelegate::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.

USDIMAGING_API TfTokenVector UsdImagingDelegate::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.

virtual USDIMAGING_API GfRange3d UsdImagingDelegate::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.

virtual USDIMAGING_API VtValue UsdImagingDelegate::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.

virtual USDIMAGING_API std::vector<VtArray<TfToken> > UsdImagingDelegate::GetInstanceCategories ( SdfPath const instancerId)
overridevirtual

Returns the categories for all instances in the instancer.

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API VtIntArray UsdImagingDelegate::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.

virtual USDIMAGING_API SdfPath UsdImagingDelegate::GetInstancerId ( SdfPath const primId)
overridevirtual

Returns the parent instancer of the given rprim or instancer.

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API SdfPathVector UsdImagingDelegate::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.

virtual USDIMAGING_API GfMatrix4d UsdImagingDelegate::GetInstancerTransform ( SdfPath const instancerId)
overridevirtual

Returns the instancer transform.

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API VtValue UsdImagingDelegate::GetLightParamValue ( SdfPath const id,
TfToken const paramName 
)
overridevirtual

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API SdfPath UsdImagingDelegate::GetMaterialId ( SdfPath const rprimId)
overridevirtual

Returns the material ID bound to the rprim rprimId.

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API VtValue UsdImagingDelegate::GetMaterialResource ( SdfPath const materialId)
overridevirtual

Returns the material ID bound to the rprim rprimId.

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API HdMeshTopology UsdImagingDelegate::GetMeshTopology ( SdfPath const id)
overridevirtual

Gets the topological mesh data for a given prim.

Reimplemented from HdSceneDelegate.

USDIMAGING_API HdModelDrawMode UsdImagingDelegate::GetModelDrawMode ( SdfPath const id)
overridevirtual

Returns the model draw mode object for the given prim.

Reimplemented from HdSceneDelegate.

USDIMAGING_API PickabilityMap UsdImagingDelegate::GetPickabilityMap ( ) const

Returns the root paths of pickable objects.

virtual USDIMAGING_API HdPrimvarDescriptorVector UsdImagingDelegate::GetPrimvarDescriptors ( SdfPath const id,
HdInterpolation  interpolation 
)
overridevirtual

Returns descriptors for all primvars of the given interpolation type.

Reimplemented from HdSceneDelegate.

int UsdImagingDelegate::GetRefineLevelFallback ( ) const
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 155 of file delegate.h.

virtual USDIMAGING_API TfToken UsdImagingDelegate::GetRenderTag ( SdfPath const id)
overridevirtual

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

Reimplemented from HdSceneDelegate.

HdReprSelector UsdImagingDelegate::GetReprFallback ( ) const
inline

Returns the fallback repr name.

Definition at line 180 of file delegate.h.

virtual USDIMAGING_API HdReprSelector UsdImagingDelegate::GetReprSelector ( SdfPath const id)
overridevirtual

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

Reimplemented from HdSceneDelegate.

SdfPath UsdImagingDelegate::GetRootInstancerId ( ) const
inline

Returns the root instancer id for the entire delegate.

Definition at line 218 of file delegate.h.

const GfMatrix4d& UsdImagingDelegate::GetRootTransform ( ) const
inline

Returns the root transform for the entire delegate.

Definition at line 201 of file delegate.h.

bool UsdImagingDelegate::GetRootVisibility ( ) const
inline

Returns the root visibility for the entire delegate.

Definition at line 210 of file delegate.h.

virtual USDIMAGING_API SdfPath UsdImagingDelegate::GetScenePrimPath ( SdfPath const rprimId,
int  instanceIndex,
HdInstancerContext instancerContext = nullptr 
)
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.

Deprecated:
use GetScenePrimPaths

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API SdfPathVector UsdImagingDelegate::GetScenePrimPaths ( SdfPath const rprimId,
std::vector< int instanceIndices,
std::vector< HdInstancerContext > *  instancerContexts = nullptr 
)
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.

virtual USDIMAGING_API SubdivTags UsdImagingDelegate::GetSubdivTags ( SdfPath const id)
overridevirtual

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

Reimplemented from HdSceneDelegate.

UsdTimeCode UsdImagingDelegate::GetTime ( ) const
inline

Returns the current time.

Definition at line 138 of file delegate.h.

UsdTimeCode UsdImagingDelegate::GetTimeWithOffset ( float  offset) const

Apply a relative offset to the current time. This has no effect in the case of the default USD timecode.

virtual USDIMAGING_API GfMatrix4d UsdImagingDelegate::GetTransform ( SdfPath const id)
overridevirtual

Returns the object space transform, including all parent transforms.

Reimplemented from HdSceneDelegate.

bool UsdImagingDelegate::GetUsdDrawModesEnabled ( ) const
inline

Definition at line 258 of file delegate.h.

virtual USDIMAGING_API bool UsdImagingDelegate::GetVisible ( SdfPath const id)
overridevirtual

Returns the authored visible state of the prim.

Reimplemented from HdSceneDelegate.

virtual USDIMAGING_API HdVolumeFieldDescriptorVector UsdImagingDelegate::GetVolumeFieldDescriptors ( SdfPath const volumeId)
overridevirtual

Reimplemented from HdSceneDelegate.

USDIMAGING_API void UsdImagingDelegate::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.

USDIMAGING_API bool UsdImagingDelegate::IsInInvisedPaths ( const SdfPath usdPath) const

Returns true if usdPath is included in invised path list.

USDIMAGING_API void UsdImagingDelegate::Populate ( UsdPrim const rootPrim)

Populates the rootPrim in the HdRenderIndex.

USDIMAGING_API void UsdImagingDelegate::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 bool UsdImagingDelegate::PopulateSelection ( HdSelection::HighlightMode const highlightMode,
const SdfPath usdPath,
int  instanceIndex,
HdSelectionSharedPtr const result 
)
USDIMAGING_API size_t UsdImagingDelegate::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.

virtual USDIMAGING_API size_t UsdImagingDelegate::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.

virtual USDIMAGING_API size_t UsdImagingDelegate::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.

virtual USDIMAGING_API size_t UsdImagingDelegate::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.

virtual USDIMAGING_API size_t UsdImagingDelegate::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.

USDIMAGING_API void UsdImagingDelegate::SetCameraForSampling ( SdfPath const id)

Setup for the shutter open and close to be used for motion sampling.

USDIMAGING_API void UsdImagingDelegate::SetCullStyleFallback ( HdCullStyle  cullStyle)

Sets the fallback cull style.

USDIMAGING_API void UsdImagingDelegate::SetDisplayGuides ( const bool  displayGuides)

Sets display of prims with purpose "guide".

USDIMAGING_API void UsdImagingDelegate::SetDisplayProxy ( const bool  displayProxy)

Sets display of prims with purpose "proxy".

USDIMAGING_API void UsdImagingDelegate::SetDisplayRender ( const bool  displayRender)

Sets display of prims with purpose "render".

USDIMAGING_API void UsdImagingDelegate::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:

  1. The prim is a UsdGeomBoundable with an authored 'extent' attribute.
  2. The prim is a UsdPrim.IsModel() and has an authored 'extentsHint' attribute (see UsdGeomModelAPI::GetExtentsHint). Effective only for delegates that support draw modes (see GetUsdDrawModesEnabled()).
USDIMAGING_API void UsdImagingDelegate::SetInvisedPrimPaths ( SdfPathVector const invisedPaths)

Set the list of paths that must be invised.

USDIMAGING_API void UsdImagingDelegate::SetPickability ( SdfPath const path,
bool  pickable 
)

Sets pickability for a specific path.

USDIMAGING_API void UsdImagingDelegate::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 UsdImagingDelegate::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 UsdImagingDelegate::SetReprFallback ( HdReprSelector const repr)

Sets the fallback repr name. Note that currently UsdImagingDelegate doesn't support per-prim repr.

USDIMAGING_API void UsdImagingDelegate::SetRigidXformOverrides ( RigidXformOverridesMap const overrides)

Set transform value overrides on a set of paths.

USDIMAGING_API void UsdImagingDelegate::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 UsdImagingDelegate::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 UsdImagingDelegate::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 UsdImagingDelegate::SetSceneLightsEnabled ( bool  enable)

Enables lights found in the usdscene.

USDIMAGING_API void UsdImagingDelegate::SetSceneMaterialsEnabled ( bool  enable)

Enables custom shading on prims.

USDIMAGING_API void UsdImagingDelegate::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 USDIMAGING_API void UsdImagingDelegate::SetTimes ( const std::vector< UsdImagingDelegate * > &  delegates,
const std::vector< UsdTimeCode > &  times 
)
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 UsdImagingDelegate::SetUsdDrawModesEnabled ( bool  enableUsdDrawModes)

Returns whether draw modes are enabled.

USDIMAGING_API void UsdImagingDelegate::SetWindowPolicy ( CameraUtilConformWindowPolicy  policy)

Set the window policy on all scene cameras. This comes from the application.

virtual USDIMAGING_API void UsdImagingDelegate::Sync ( HdSyncRequestVector request)
overridevirtual

Synchronizes the delegate state for the given request vector.

Reimplemented from HdSceneDelegate.

USDIMAGING_API void UsdImagingDelegate::SyncAll ( bool  includeUnvarying)

Friends And Related Function Documentation

friend class UsdImagingIndexProxy
friend

Definition at line 545 of file delegate.h.

Definition at line 547 of file delegate.h.

Member Data Documentation

constexpr int UsdImagingDelegate::ALL_INSTANCES = -1
static

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 525 of file delegate.h.


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