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
68 static HdsiCoordSysPrimSceneIndexRefPtr
New(
69 HdSceneIndexBaseRefPtr
const &inputScene)
71 return TfCreateRefPtr(
85 HdSceneIndexBaseRefPtr
const &inputScene);
105 using _Bindings = std::vector<_Binding>;
106 using _PrimToBindings = std::map<SdfPath, _Bindings>;
112 void _AddBindingsForPrim(
const SdfPath &primPath,
113 SdfPathSet * addedCoordSysPrims =
nullptr);
118 void _RemoveBindings(
const _Bindings &bindings,
119 SdfPathSet * removedCoordSysPrims);
122 void _RemoveBindingsForPrim(
const SdfPath &primPath,
123 SdfPathSet * removedCoordSysPrims);
126 void _RemoveBindingsForSubtree(
const SdfPath &primPath,
127 SdfPathSet * removedCoordSysPrims);
131 HdContainerDataSourceHandle _GetCoordSysPrimSource(
132 const SdfPath &primPath)
const;
135 using _NameToRefCount =
136 std::unordered_map<TfToken, size_t, TfToken::HashFunctor>;
137 using _PrimToNameToRefCount =
138 std::unordered_map<SdfPath, _NameToRefCount, SdfPath::Hash>;
158 _PrimToNameToRefCount _targetedPrimToNameToRefCount;
168 _PrimToBindings _primToBindings;
171PXR_NAMESPACE_CLOSE_SCOPE
Abstract interface to scene data.
If prim P has a coord sys binding FOO to another prim Q, the scene index will add a coord sys prim Q....
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.