7#ifndef PXR_IMAGING_HDSI_COORD_SYS_PRIM_SCENE_INDEX_H
8#define PXR_IMAGING_HDSI_COORD_SYS_PRIM_SCENE_INDEX_H
10#include "pxr/imaging/hdsi/api.h"
12#include "pxr/imaging/hd/filteringSceneIndex.h"
14PXR_NAMESPACE_OPEN_SCOPE
71 static HdsiCoordSysPrimSceneIndexRefPtr
New(
72 HdSceneIndexBaseRefPtr
const &inputScene)
74 return TfCreateRefPtr(
88 HdSceneIndexBaseRefPtr
const &inputScene);
108 using _Bindings = std::vector<_Binding>;
109 using _PrimToBindings = std::map<SdfPath, _Bindings>;
115 void _AddBindingsForPrim(
const SdfPath &primPath,
116 SdfPathSet * addedCoordSysPrims =
nullptr);
119 _Bindings _ComputeBindingsForPrim(
const SdfPath &primPath)
const;
122 void _AddBindings(
const SdfPath &primPath,
123 _Bindings &&bindings,
124 SdfPathSet * addedCoordSysPrims);
129 void _RemoveBindings(
const _Bindings &bindings,
130 SdfPathSet * removedCoordSysPrims);
133 void _RemoveBindingsForPrim(
const SdfPath &primPath,
134 SdfPathSet * removedCoordSysPrims);
137 void _RemoveBindingsForSubtree(
const SdfPath &primPath,
138 SdfPathSet * removedCoordSysPrims);
142 HdContainerDataSourceHandle _GetCoordSysPrimSource(
143 const SdfPath &primPath)
const;
146 using _NameToRefCount =
147 std::unordered_map<TfToken, size_t, TfToken::HashFunctor>;
148 using _PrimToNameToRefCount =
149 std::unordered_map<SdfPath, _NameToRefCount, SdfPath::Hash>;
169 _PrimToNameToRefCount _targetedPrimToNameToRefCount;
179 _PrimToBindings _primToBindings;
182PXR_NAMESPACE_CLOSE_SCOPE
Abstract interface to scene data.
This is a utility scene index to aid emulation of Hydra 1 style coordinate systems,...
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
static HdsiCoordSysPrimSceneIndexRefPtr New(HdSceneIndexBaseRefPtr const &inputScene)
Creates a new coord sys prim scene index.
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Small struct representing a 'prim' in the Hydra scene index.