24 #ifndef PXR_IMAGING_HD_FLATTENING_SCENE_H 25 #define PXR_IMAGING_HD_FLATTENING_SCENE_H 27 #include "pxr/imaging/hd/api.h" 29 #include "pxr/imaging/hd/dataSourceTypeDefs.h" 30 #include "pxr/imaging/hd/filteringSceneIndex.h" 32 #include "pxr/usd/sdf/pathTable.h" 34 PXR_NAMESPACE_OPEN_SCOPE
55 static HdFlatteningSceneIndexRefPtr
New(
56 const HdSceneIndexBaseRefPtr &inputScene) {
96 _PrimEntryTable _prims;
98 HdContainerDataSourceHandle _identityXform;
99 HdContainerDataSourceHandle _identityVis;
100 HdContainerDataSourceHandle _identityPurpose;
101 HdTokenDataSourceHandle _identityDrawMode;
104 void _DirtyHierarchy(
111 friend class _PrimLevelWrappingDataSource;
118 HD_DECLARE_DATASOURCE(_PrimLevelWrappingDataSource);
120 _PrimLevelWrappingDataSource(
123 HdContainerDataSourceHandle inputDataSource);
125 void UpdateInputDataSource(HdContainerDataSourceHandle inputDataSource);
129 bool Has(
const TfToken &name)
override;
131 HdDataSourceBaseHandle
Get(
const TfToken &name)
override;
134 HdDataSourceBaseHandle _GetXform();
135 HdDataSourceBaseHandle _GetVis();
136 HdDataSourceBaseHandle _GetPurpose();
137 HdDataSourceBaseHandle _GetModel();
138 HdDataSourceBaseHandle _GetDrawMode(
139 const HdContainerDataSourceHandle &model);
140 HdTokenDataSourceHandle _GetDrawModeUncached(
141 const HdContainerDataSourceHandle &model);
145 HdContainerDataSourceHandle _inputDataSource;
146 HdContainerDataSourceAtomicHandle _computedXformDataSource;
147 HdContainerDataSourceAtomicHandle _computedVisDataSource;
148 HdContainerDataSourceAtomicHandle _computedPurposeDataSource;
149 HdTokenDataSource::AtomicHandle _computedDrawModeDataSource;
152 HD_DECLARE_DATASOURCE_HANDLES(_PrimLevelWrappingDataSource);
156 PXR_NAMESPACE_CLOSE_SCOPE
HD_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
Small struct representing a 'prim' in the Hydra scene index.
Token for efficient comparison, assignment, and hashing of known strings.
Abstract interface to scene data.
static HdFlatteningSceneIndexRefPtr New(const HdSceneIndexBaseRefPtr &inputScene)
Creates a new flattening scene index.
Represents a set of data source locators closed under descendancy.
std::vector< TfToken > TfTokenVector
Convenience types.
A path value used to locate objects in layers or scenegraphs.
HD_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource) for the object at primPath.
A scene index that observes an input scene index and produces a comparable scene in which inherited s...
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
static HD_API HdDataSourceBaseHandle Get(const Handle &container, const HdDataSourceLocator &locator)
A convenience function: given container, return the descendant identified by locator,...