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

#include <indexProxy.h>

Public Member Functions

USDIMAGING_API void AddDependency (SdfPath const &cachePath, UsdPrim const &usdPrim)
 
USDIMAGING_API void InsertRprim (TfToken const &primType, SdfPath const &cachePath, SdfPath const &parentPath, UsdPrim const &usdPrim, UsdImagingPrimAdapterSharedPtr adapter=UsdImagingPrimAdapterSharedPtr())
 
USDIMAGING_API void InsertSprim (TfToken const &primType, SdfPath const &cachePath, UsdPrim const &usdPrim, UsdImagingPrimAdapterSharedPtr adapter=UsdImagingPrimAdapterSharedPtr())
 
USDIMAGING_API void InsertBprim (TfToken const &primType, SdfPath const &cachePath, UsdPrim const &usdPrim, UsdImagingPrimAdapterSharedPtr adapter=UsdImagingPrimAdapterSharedPtr())
 
USDIMAGING_API void InsertInstancer (SdfPath const &cachePath, SdfPath const &parentPath, UsdPrim const &usdPrim, UsdImagingPrimAdapterSharedPtr adapter=UsdImagingPrimAdapterSharedPtr())
 
USDIMAGING_API void Refresh (SdfPath const &cachePath)
 
void RemoveRprim (SdfPath const &cachePath)
 
void RemoveSprim (TfToken const &primType, SdfPath const &cachePath)
 
void RemoveBprim (TfToken const &primType, SdfPath const &cachePath)
 
void RemoveInstancer (SdfPath const &cachePath)
 
USDIMAGING_API void MarkRprimDirty (SdfPath const &cachePath, HdDirtyBits dirtyBits)
 
USDIMAGING_API void MarkSprimDirty (SdfPath const &cachePath, HdDirtyBits dirtyBits)
 
USDIMAGING_API void MarkBprimDirty (SdfPath const &cachePath, HdDirtyBits dirtyBits)
 
USDIMAGING_API void MarkInstancerDirty (SdfPath const &cachePath, HdDirtyBits dirtyBits)
 
USDIMAGING_API bool IsRprimTypeSupported (TfToken const &typeId) const
 
USDIMAGING_API bool IsSprimTypeSupported (TfToken const &typeId) const
 
USDIMAGING_API bool IsBprimTypeSupported (TfToken const &typeId) const
 
USDIMAGING_API bool IsPopulated (SdfPath const &cachePath) const
 
USDIMAGING_API void Repopulate (SdfPath const &usdPath)
 
USDIMAGING_API
UsdImagingPrimAdapterSharedPtr 
GetMaterialAdapter (UsdPrim const &materialPrim)
 

Friends

class UsdImagingDelegate
 
class UsdImagingGprimAdapter
 

Detailed Description

This proxy class exposes a subset of the private Delegate API to PrimAdapters.

Definition at line 47 of file indexProxy.h.

Member Function Documentation

USDIMAGING_API void UsdImagingIndexProxy::AddDependency ( SdfPath const cachePath,
UsdPrim const usdPrim 
)

A note on paths/prims: the core function of UsdImagingIndexProxy and UsdImagingDelegate is to maintain a set of mappings between USD prims and hydra prims (and a set of adapters that know how to translate USD properties to hydra buffers). A USD prim can represent multiple hydra prims (e.g. point instancer prototypes that are referenced twice), and a hydra prim can represent multiple USD prims (e.g. a single hydra instancer prim representing multiple native instances).

There are three different prim "namespaces" that the delegate works with: "USD paths", which represent paths to USD prims; "index paths", which represent paths to hydra prims in the render index; and "cache paths", which represent paths to buffers in the value cache backing hydra prims. Cache paths and index paths are the same, except that index paths have the "delegateID" prefixed onto their path.

Index paths are only used in the interface to hydra. In IndexProxy and the adapters, the pattern is to use "cachePath" as a key to look up state for a hydra prim; and pass "usdPrim" when we additionally need to specify the related USD prim. The naming helps clarify them, and the fact that we pass a UsdPrim and not an SdfPath further ensures that we pass valid USD paths instead of passing cache paths by mistake. Adds a dependency from the given usdPrim to the given cache path. Insert* will automatically add a dependency, so this is for hydra prims that may depend on more than one usd prim (e.g. subsets, instancers)

USDIMAGING_API UsdImagingPrimAdapterSharedPtr UsdImagingIndexProxy::GetMaterialAdapter ( UsdPrim const materialPrim)
USDIMAGING_API void UsdImagingIndexProxy::InsertBprim ( TfToken const primType,
SdfPath const cachePath,
UsdPrim const usdPrim,
UsdImagingPrimAdapterSharedPtr  adapter = UsdImagingPrimAdapterSharedPtr() 
)
USDIMAGING_API void UsdImagingIndexProxy::InsertInstancer ( SdfPath const cachePath,
SdfPath const parentPath,
UsdPrim const usdPrim,
UsdImagingPrimAdapterSharedPtr  adapter = UsdImagingPrimAdapterSharedPtr() 
)
USDIMAGING_API void UsdImagingIndexProxy::InsertRprim ( TfToken const primType,
SdfPath const cachePath,
SdfPath const parentPath,
UsdPrim const usdPrim,
UsdImagingPrimAdapterSharedPtr  adapter = UsdImagingPrimAdapterSharedPtr() 
)

Insert a hydra prim with the specified cache path. As mentioned above, the delegateID will be prepended before adding the prim in hydra, but cachePath will be the key into all internal usdImaging datastructures. usdPrim is the USD prim this hydra prim is representing (e.g. the UsdGeomMesh for which we are inserting a hydra mesh). If no adapter is specified, UsdImagingDelegate will choose based on Usd prim type; some clients (e.g. instancing) want to override the adapter choice but this should be used sparingly.

For Rprims and Instancers, "parentPath" is the parent instancer.

USDIMAGING_API void UsdImagingIndexProxy::InsertSprim ( TfToken const primType,
SdfPath const cachePath,
UsdPrim const usdPrim,
UsdImagingPrimAdapterSharedPtr  adapter = UsdImagingPrimAdapterSharedPtr() 
)
USDIMAGING_API bool UsdImagingIndexProxy::IsBprimTypeSupported ( TfToken const typeId) const
USDIMAGING_API bool UsdImagingIndexProxy::IsPopulated ( SdfPath const cachePath) const
USDIMAGING_API bool UsdImagingIndexProxy::IsRprimTypeSupported ( TfToken const typeId) const
USDIMAGING_API bool UsdImagingIndexProxy::IsSprimTypeSupported ( TfToken const typeId) const
USDIMAGING_API void UsdImagingIndexProxy::MarkBprimDirty ( SdfPath const cachePath,
HdDirtyBits  dirtyBits 
)
USDIMAGING_API void UsdImagingIndexProxy::MarkInstancerDirty ( SdfPath const cachePath,
HdDirtyBits  dirtyBits 
)
USDIMAGING_API void UsdImagingIndexProxy::MarkRprimDirty ( SdfPath const cachePath,
HdDirtyBits  dirtyBits 
)
USDIMAGING_API void UsdImagingIndexProxy::MarkSprimDirty ( SdfPath const cachePath,
HdDirtyBits  dirtyBits 
)
USDIMAGING_API void UsdImagingIndexProxy::Refresh ( SdfPath const cachePath)
void UsdImagingIndexProxy::RemoveBprim ( TfToken const primType,
SdfPath const cachePath 
)
inline

Definition at line 145 of file indexProxy.h.

void UsdImagingIndexProxy::RemoveInstancer ( SdfPath const cachePath)
inline

Definition at line 153 of file indexProxy.h.

void UsdImagingIndexProxy::RemoveRprim ( SdfPath const cachePath)
inline

Definition at line 130 of file indexProxy.h.

void UsdImagingIndexProxy::RemoveSprim ( TfToken const primType,
SdfPath const cachePath 
)
inline

Definition at line 137 of file indexProxy.h.

USDIMAGING_API void UsdImagingIndexProxy::Repopulate ( SdfPath const usdPath)

Friends And Related Function Documentation

friend class UsdImagingDelegate
friend

Definition at line 193 of file indexProxy.h.

Definition at line 211 of file indexProxy.h.


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