nurbsApproximatingSceneIndex.h
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 #ifndef PXR_IMAGING_HDSI_NURBS_APPROXIMATING_SCENE_INDEX_H
7 #define PXR_IMAGING_HDSI_NURBS_APPROXIMATING_SCENE_INDEX_H
8 
9 #include "pxr/pxr.h"
10 #include "pxr/imaging/hdsi/api.h"
11 #include "pxr/imaging/hd/filteringSceneIndex.h"
12 
13 PXR_NAMESPACE_OPEN_SCOPE
14 
16 
26 {
27 public:
28  HDSI_API
29  static HdsiNurbsApproximatingSceneIndexRefPtr
30  New(const HdSceneIndexBaseRefPtr &inputSceneIndex);
31 
32  HDSI_API
33  HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
34  HDSI_API
35  SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
36 
37 protected:
39  const HdSceneIndexBaseRefPtr &inputSceneIndex);
40 
41  void _PrimsAdded(
42  const HdSceneIndexBase &sender,
43  const HdSceneIndexObserver::AddedPrimEntries &entries) override;
44 
45  void _PrimsRemoved(
46  const HdSceneIndexBase &sender,
47  const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
48 
49  void _PrimsDirtied(
50  const HdSceneIndexBase &sender,
51  const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
52 };
53 
54 PXR_NAMESPACE_CLOSE_SCOPE
55 
56 #endif //PXR_IMAGING_HDSI_NURBS_APPROXIMATING_SCENE_INDEX_H
An abstract base class for a filtering scene index that observes a single input scene index.
Converts prims of type nurbsCurves and nurbsPatches to basisCurves and mesh, respectively.
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
Small struct representing a 'prim' in the Hydra scene index.
Definition: sceneIndex.h:35
Abstract interface to scene data.
Definition: sceneIndex.h:54
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:280
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:58
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.