24#ifndef PXR_USD_IMAGING_USD_IMAGING_NI_PROTOTYPE_PROPAGATING_SCENE_INDEX_H
25#define PXR_USD_IMAGING_USD_IMAGING_NI_PROTOTYPE_PROPAGATING_SCENE_INDEX_H
27#include "pxr/usdImaging/usdImaging/api.h"
29#include "pxr/imaging/hd/dataSourceHash.h"
30#include "pxr/imaging/hd/filteringSceneIndex.h"
32PXR_NAMESPACE_OPEN_SCOPE
307 using SceneIndexAppendCallback =
309 HdSceneIndexBaseRefPtr(
const HdSceneIndexBaseRefPtr &inputScene)>;
323 static UsdImagingNiPrototypePropagatingSceneIndexRefPtr New(
324 HdSceneIndexBaseRefPtr
const &inputSceneIndex,
326 const SceneIndexAppendCallback &sceneIndexAppendCallback);
338 std::vector<HdSceneIndexBaseRefPtr> GetInputScenes()
const override;
341 class _SceneIndexCache;
342 using _SceneIndexCacheSharedPtr =
343 std::shared_ptr<_SceneIndexCache>;
345 class _MergingSceneIndexEntry;
346 using _MergingSceneIndexEntryUniquePtr =
347 std::unique_ptr<_MergingSceneIndexEntry>;
349 friend class _InstanceAggregationSceneIndexObserver;
353 _InstanceAggregationSceneIndexObserver(
358 const AddedPrimEntries &entries)
override;
361 const DirtiedPrimEntries &entries)
override;
364 const RemovedPrimEntries &entries)
override;
367 const RenamedPrimEntries &entries)
override;
373 friend class _MergingSceneIndexObserver;
377 _MergingSceneIndexObserver(
382 const AddedPrimEntries &entries)
override;
385 const DirtiedPrimEntries &entries)
override;
388 const RemovedPrimEntries &entries)
override;
391 const RenamedPrimEntries &entries)
override;
398 static UsdImagingNiPrototypePropagatingSceneIndexRefPtr _New(
400 HdContainerDataSourceHandle
const &prototypeRootOverlayDs,
401 _SceneIndexCacheSharedPtr
const &cache);
405 HdContainerDataSourceHandle
const &prototypeRootOverlayDs,
406 _SceneIndexCacheSharedPtr
const &cache);
408 void _Populate(HdSceneIndexBaseRefPtr
const &instanceAggregationSceneIndex);
409 void _AddPrim(
const SdfPath &primPath);
410 void _RemovePrim(
const SdfPath &primPath);
413 const HdDataSourceHashType _prototypeRootOverlayDsHash;
414 _SceneIndexCacheSharedPtr
const _cache;
416 HdMergingSceneIndexRefPtr _mergingSceneIndex;
418 std::map<SdfPath, _MergingSceneIndexEntryUniquePtr>
419 _instancersToMergingSceneIndexEntry;
421 HdSceneIndexBaseRefPtr _instanceAggregationSceneIndex;
423 _InstanceAggregationSceneIndexObserver
424 _instanceAggregationSceneIndexObserver;
425 _MergingSceneIndexObserver _mergingSceneIndexObserver;
428PXR_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.
Abstract interface to scene data.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
A scene index implementing USD native instancing.
USDIMAGING_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
USDIMAGING_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource) for the object at primPath.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Small struct representing a 'prim' in the Hydra scene index.
std::vector< TfToken > TfTokenVector
Convenience types.