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
54 static HdFlatteningSceneIndexRefPtr
New(
55 HdSceneIndexBaseRefPtr
const &inputScene,
56 HdContainerDataSourceHandle
const &inputArgs =
nullptr) {
57 return TfCreateRefPtr(
75 HdSceneIndexBaseRefPtr
const &inputScene,
76 HdContainerDataSourceHandle
const &inputArgs);
98 _PrimEntryTable _prims;
101 bool _flattenVisibility;
102 bool _flattenPurpose;
104 bool _flattenMaterialBinding;
107 HdContainerDataSourceHandle _identityXform;
108 HdContainerDataSourceHandle _identityVis;
109 HdContainerDataSourceHandle _identityPurpose;
110 HdTokenDataSourceHandle _identityDrawMode;
113 void _FillPrimsRecursively(
const SdfPath &primPath);
115 void _DirtyHierarchy(
122 friend class _PrimLevelWrappingDataSource;
129 HD_DECLARE_DATASOURCE(_PrimLevelWrappingDataSource);
131 _PrimLevelWrappingDataSource(
134 HdContainerDataSourceHandle inputDataSource);
136 void UpdateInputDataSource(HdContainerDataSourceHandle inputDataSource);
141 HdDataSourceBaseHandle
Get(
const TfToken &name)
override;
144 HdDataSourceBaseHandle _GetXform();
145 HdDataSourceBaseHandle _GetVis();
146 HdDataSourceBaseHandle _GetPurpose();
147 HdDataSourceBaseHandle _GetModel();
148 HdDataSourceBaseHandle _GetDrawMode(
149 const HdContainerDataSourceHandle &model);
150 HdTokenDataSourceHandle _GetDrawModeUncached(
151 const HdContainerDataSourceHandle &model);
152 HdDataSourceBaseHandle _GetMaterialBinding();
153 HdDataSourceBaseHandle _GetMaterialBindingUncached();
157 HdContainerDataSourceHandle _inputDataSource;
158 HdContainerDataSourceAtomicHandle _computedXformDataSource;
159 HdContainerDataSourceAtomicHandle _computedVisDataSource;
160 HdContainerDataSourceAtomicHandle _computedPurposeDataSource;
161 HdTokenDataSource::AtomicHandle _computedDrawModeDataSource;
167 HdDataSourceBaseAtomicHandle _computedMaterialBindingDataSource;
170 HD_DECLARE_DATASOURCE_HANDLES(_PrimLevelWrappingDataSource);
174 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.
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...
static HdFlatteningSceneIndexRefPtr New(HdSceneIndexBaseRefPtr const &inputScene, HdContainerDataSourceHandle const &inputArgs=nullptr)
Creates a new flattening scene index.
#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,...