24#ifndef PXR_IMAGING_HDSI_COORD_SYS_PRIM_SCENE_INDEX_H
25#define PXR_IMAGING_HDSI_COORD_SYS_PRIM_SCENE_INDEX_H
27#include "pxr/imaging/hdsi/api.h"
29#include "pxr/imaging/hd/filteringSceneIndex.h"
31PXR_NAMESPACE_OPEN_SCOPE
85 static HdsiCoordSysPrimSceneIndexRefPtr
New(
86 HdSceneIndexBaseRefPtr
const &inputScene)
88 return TfCreateRefPtr(
102 HdSceneIndexBaseRefPtr
const &inputScene);
122 using _Bindings = std::vector<_Binding>;
123 using _PrimToBindings = std::map<SdfPath, _Bindings>;
129 void _AddBindingsForPrim(
const SdfPath &primPath,
130 SdfPathSet * addedCoordSysPrims =
nullptr);
135 void _RemoveBindings(
const _Bindings &bindings,
136 SdfPathSet * removedCoordSysPrims);
139 void _RemoveBindingsForPrim(
const SdfPath &primPath,
140 SdfPathSet * removedCoordSysPrims);
143 void _RemoveBindingsForSubtree(
const SdfPath &primPath,
144 SdfPathSet * removedCoordSysPrims);
148 HdContainerDataSourceHandle _GetCoordSysPrimSource(
149 const SdfPath &primPath)
const;
152 using _NameToRefCount =
153 std::unordered_map<TfToken, size_t, TfToken::HashFunctor>;
154 using _PrimToNameToRefCount =
155 std::unordered_map<SdfPath, _NameToRefCount, SdfPath::Hash>;
175 _PrimToNameToRefCount _targetedPrimToNameToRefCount;
185 _PrimToBindings _primToBindings;
188PXR_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) for the object at primPath.
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.