7#ifndef PXR_IMAGING_HD_MERGING_SCENE_H
8#define PXR_IMAGING_HD_MERGING_SCENE_H
11#include "pxr/imaging/hd/filteringSceneIndex.h"
12#include "pxr/usd/sdf/pathTable.h"
17PXR_NAMESPACE_OPEN_SCOPE
33 static HdMergingSceneIndexRefPtr New() {
52 size_t pos = std::numeric_limits<size_t>::max();
58 const std::vector<InputScene> &inputScenes);
63 const std::vector<HdSceneIndexBaseRefPtr> &sceneIndices);
71 const HdSceneIndexBaseRefPtr &inputScene,
72 const SdfPath &activeInputSceneRoot);
75 void InsertInputScene(
77 const HdSceneIndexBaseRefPtr &inputScene,
78 const SdfPath &activeInputSceneRoot);
81 void RemoveInputScene(
const HdSceneIndexBaseRefPtr &sceneIndex);
112 friend class _Observer;
115 void _RebuildInputsPathTable();
121 void _AddStrictPrefixesOfSceneRoots(
122 const std::vector<InputScene> &inputScenes,
125 bool _HasPrim(
const SdfPath &path);
135 const AddedPrimEntries &entries)
override;
139 const RemovedPrimEntries &entries)
override;
143 const DirtiedPrimEntries &entries)
override;
147 const RenamedPrimEntries &entries)
override;
157 HdSceneIndexBaseRefPtr sceneIndex;
160 _InputEntry(
const HdSceneIndexBaseRefPtr &sceneIndex,
162 : sceneIndex(sceneIndex)
163 , sceneRoot(sceneRoot)
178 const _InputEntries &_GetInputEntriesByPath(
SdfPath const& path)
const;
180 _InputEntries _inputs;
181 _InputEntriesByPathTable _inputsPathTable;
186PXR_NAMESPACE_CLOSE_SCOPE
An abstract base class for scene indexes that have one or more input scene indexes which serve as a b...
Merges multiple scenes together.
SdfPath activeInputSceneRoot
The shallowest path at which prims in the scene should be considered.
HD_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
HD_API void InsertInputScenes(const std::vector< InputScene > &inputScenes)
Adds given scenes.
size_t pos
The position where to insert the scene.
HD_API std::vector< HdSceneIndexBaseRefPtr > GetInputScenes() const override
satisfying HdFilteringSceneIndex
HdSceneIndexBaseRefPtr scene
The scene to add.
HD_API void RemoveInputScenes(const std::vector< HdSceneIndexBaseRefPtr > &sceneIndices)
Removes given scenes.
HD_API void AddInputScene(const HdSceneIndexBaseRefPtr &inputScene, const SdfPath &activeInputSceneRoot)
Adds a scene with activeInputSceneRoot specifying the shallowest path at which prims should be consid...
HD_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
Abstract interface to scene data.
A path value used to locate objects in layers or scenegraphs.
static SDF_API const SdfPath & AbsoluteRootPath()
The absolute path representing the top of the namespace hierarchy.
A mapping from SdfPath to MappedType, somewhat similar to map<SdfPath, MappedType> and TfHashMap<SdfP...
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Small struct representing a 'prim' in the Hydra scene index.