6 #ifndef PXR_IMAGING_HDSI_SWITCHING_SCENE_INDEX_H 7 #define PXR_IMAGING_HDSI_SWITCHING_SCENE_INDEX_H 11 #include "pxr/imaging/hd/filteringSceneIndex.h" 12 #include "pxr/imaging/hdsi/api.h" 13 #include "pxr/imaging/hdsi/computeSceneIndexDiff.h" 15 PXR_NAMESPACE_OPEN_SCOPE
29 using ComputeDiffFn = HdsiComputeSceneIndexDiff;
31 static HdsiSwitchingSceneIndexRefPtr
32 New(
const std::vector<HdSceneIndexBaseRefPtr>& inputs,
33 size_t initialIndex = 0,
34 ComputeDiffFn computeDiffFn = HdsiComputeSceneIndexDiffDelta)
37 inputs, initialIndex, std::move(computeDiffFn)));
43 const std::vector<HdSceneIndexBaseRefPtr>& inputs,
45 ComputeDiffFn computeDiffFn);
60 std::vector<HdSceneIndexBaseRefPtr> GetInputScenes()
const override;
70 void _UpdateCurrentSceneIndex(
size_t index);
88 friend class _Observer;
100 const AddedPrimEntries& entries)
override;
103 const RemovedPrimEntries& entries)
override;
106 const DirtiedPrimEntries& entries)
override;
109 const RenamedPrimEntries& entries)
override;
117 std::vector<HdSceneIndexBaseRefPtr> _inputs;
119 HdSceneIndexBaseRefPtr _currentSceneIndex;
121 ComputeDiffFn _computeDiffFn;
124 PXR_NAMESPACE_CLOSE_SCOPE
This is a scene index that can switch between multiple inputs (which are fixed at construction time).
HDSI_API size_t GetIndex() const
Returns the current index.
Small struct representing a 'prim' in the Hydra scene index.
Abstract interface to scene data.
A path value used to locate objects in layers or scenegraphs.
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
An abstract base class for scene indexes that have one or more input scene indexes which serve as a b...
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
HDSI_API void SetIndex(size_t index)
Sets the current index.
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).