7#ifndef PXR_USD_IMAGING_USD_IMAGING_INDEX_PROXY_H
8#define PXR_USD_IMAGING_USD_IMAGING_INDEX_PROXY_H
13#include "pxr/usdImaging/usdImaging/api.h"
16#include "pxr/usd/sdf/path.h"
22PXR_NAMESPACE_OPEN_SCOPE
76 UsdImagingPrimAdapterSharedPtr adapter =
77 UsdImagingPrimAdapterSharedPtr());
80 void InsertSprim(
TfToken const& primType,
83 UsdImagingPrimAdapterSharedPtr adapter =
84 UsdImagingPrimAdapterSharedPtr());
87 void InsertBprim(
TfToken const& primType,
90 UsdImagingPrimAdapterSharedPtr adapter =
91 UsdImagingPrimAdapterSharedPtr());
94 void InsertInstancer(
SdfPath const& cachePath,
96 UsdImagingPrimAdapterSharedPtr adapter =
97 UsdImagingPrimAdapterSharedPtr());
103 void RequestTrackVariability(
SdfPath const& cachePath);
106 void RequestUpdateForTime(
SdfPath const& cachePath);
113 void RemoveRprim(
SdfPath const& cachePath) {
114 _rprimsToRemove.push_back(cachePath);
115 _hdPrimInfoToRemove.push_back(cachePath);
116 _RemoveDependencies(cachePath);
120 void RemoveSprim(
TfToken const& primType,
SdfPath const& cachePath) {
121 _TypeAndPath primToRemove = {primType, cachePath};
122 _sprimsToRemove.push_back(primToRemove);
123 _hdPrimInfoToRemove.push_back(cachePath);
124 _RemoveDependencies(cachePath);
128 void RemoveBprim(
TfToken const& primType,
SdfPath const& cachePath) {
129 _TypeAndPath primToRemove = {primType, cachePath};
130 _bprimsToRemove.push_back(primToRemove);
131 _hdPrimInfoToRemove.push_back(cachePath);
132 _RemoveDependencies(cachePath);
136 void RemoveInstancer(
SdfPath const& cachePath) {
137 _instancersToRemove.push_back(cachePath);
138 _hdPrimInfoToRemove.push_back(cachePath);
139 _RemoveDependencies(cachePath);
143 void MarkRprimDirty(
SdfPath const& cachePath, HdDirtyBits dirtyBits);
146 void MarkSprimDirty(
SdfPath const& cachePath, HdDirtyBits dirtyBits);
149 void MarkBprimDirty(
SdfPath const& cachePath, HdDirtyBits dirtyBits);
152 void MarkInstancerDirty(
SdfPath const& cachePath, HdDirtyBits dirtyBits);
155 bool IsRprimTypeSupported(
TfToken const& typeId)
const;
158 bool IsSprimTypeSupported(
TfToken const& typeId)
const;
161 bool IsBprimTypeSupported(
TfToken const& typeId)
const;
165 bool IsPopulated(
SdfPath const& cachePath)
const;
169 void Repopulate(
SdfPath const& usdPath);
172 UsdImagingPrimAdapterSharedPtr GetMaterialAdapter(
184 void RemovePrimInfoDependency(
SdfPath const& cachePath);
189 UsdImagingDelegate::_Worker* worker)
190 : _delegate(delegate)
196 void _UniqueifyPathsToRepopulate();
198 UsdImagingDelegate::_HdPrimInfo*
199 _AddHdPrimInfo(
SdfPath const& cachePath,
201 UsdImagingPrimAdapterSharedPtr
const& adapter);
204 void _RemoveDependencies(
SdfPath const& cachePath);
206 SdfPathVector
const& _GetUsdPathsToRepopulate() {
207 return _usdPathsToRepopulate;
209 void _ProcessRemovals();
211 void _AddTask(
SdfPath const& usdPath);
213 struct _TypeAndPath {
218 typedef std::vector<_TypeAndPath> _TypeAndPathVector;
220 typedef std::vector<UsdImagingDelegate::_DependencyMap::value_type>
224 UsdImagingDelegate::_Worker* _worker;
225 SdfPathVector _usdPathsToRepopulate;
226 SdfPathVector _rprimsToRemove;
227 _TypeAndPathVector _sprimsToRemove;
228 _TypeAndPathVector _bprimsToRemove;
229 SdfPathVector _instancersToRemove;
230 SdfPathVector _hdPrimInfoToRemove;
231 _DependencyVector _dependenciesToRemove;
235PXR_NAMESPACE_CLOSE_SCOPE
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
The primary translation layer between the Hydra (Hd) core and the Usd scene graph.
This proxy class exposes a subset of the private Delegate API to PrimAdapters.
USDIMAGING_API void AddDependency(SdfPath const &cachePath, UsdPrim const &usdPrim)
A note on paths/prims: the core function of UsdImagingIndexProxy and UsdImagingDelegate is to maintai...
USDIMAGING_API void InsertRprim(TfToken const &primType, SdfPath const &cachePath, UsdPrim const &usdPrim, UsdImagingPrimAdapterSharedPtr adapter=UsdImagingPrimAdapterSharedPtr())
Insert a hydra prim with the specified cache path.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...