HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nurbsApproximatingSceneIndex.h
Go to the documentation of this file.
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"
12 
14 
16 
17 ///
18 /// \class HdsiNurbsApproximatingSceneIndex
19 ///
20 /// Converts prims of type nurbsCurves and nurbsPatches to basisCurves and mesh,
21 /// respectively. The result is only an approximation for clients that do not
22 /// natively supports nurbs.
23 ///
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 
55 
56 #endif //PXR_IMAGING_HDSI_NURBS_APPROXIMATING_SCENE_INDEX_H
HdsiNurbsApproximatingSceneIndex(const HdSceneIndexBaseRefPtr &inputSceneIndex)
void _PrimsRemoved(const HdSceneIndexBase &sender, const HdSceneIndexObserver::RemovedPrimEntries &entries) override
void _PrimsAdded(const HdSceneIndexBase &sender, const HdSceneIndexObserver::AddedPrimEntries &entries) override
void _PrimsDirtied(const HdSceneIndexBase &sender, const HdSceneIndexObserver::DirtiedPrimEntries &entries) override
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_REF_PTRS(HdsiNurbsApproximatingSceneIndex)
std::vector< class SdfPath > SdfPathVector
Definition: path.h:273
#define HDSI_API
Definition: api.h:23
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
static HDSI_API HdsiNurbsApproximatingSceneIndexRefPtr New(const HdSceneIndexBaseRefPtr &inputSceneIndex)