HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dataSourceMesh.h
Go to the documentation of this file.
1 //
2 // Copyright 2022 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MESH_H
8 #define PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MESH_H
9 
12 
13 #include "pxr/usd/usdGeom/mesh.h"
14 
16 
18 
19 /// \class UsdImagingDataSourceSubdivisionTags
20 ///
21 /// A container data source representing subdivision tags.
22 ///
24 {
25 public:
27 
28  TfTokenVector GetNames() override;
29  HdDataSourceBaseHandle Get(const TfToken &name) override;
30 
31 private:
33  UsdGeomMesh usdMesh,
34  const UsdImagingDataSourceStageGlobals &stageGlobals);
35 
36 private:
37  UsdGeomMesh _usdMesh;
38  const UsdImagingDataSourceStageGlobals & _stageGlobals;
39 };
40 
42 
43 // ----------------------------------------------------------------------------
44 
45 /// \class UsdImagingDataSourceMeshTopology
46 ///
47 /// A container data source representing mesh topology.
48 ///
50 {
51 public:
53 
54  TfTokenVector GetNames() override;
55  HdDataSourceBaseHandle Get(const TfToken &name) override;
56 
57 private:
59  const SdfPath &sceneIndexPath,
60  UsdGeomMesh usdMesh,
61  const UsdImagingDataSourceStageGlobals &stageGlobals);
62 
63 private:
64  const SdfPath _sceneIndexPath;
65  UsdGeomMesh _usdMesh;
66  const UsdImagingDataSourceStageGlobals & _stageGlobals;
67 };
68 
70 
71 // ----------------------------------------------------------------------------
72 
73 
74 /// \class UsdImagingDataSourceMesh
75 ///
76 /// A container data source representing data unique to meshes
77 ///
79 {
80 public:
82 
83  TfTokenVector GetNames() override;
84  HdDataSourceBaseHandle Get(const TfToken &name) override;
85 
86 private:
88  const SdfPath &sceneIndexPath,
89  UsdGeomMesh usdMesh,
90  const UsdImagingDataSourceStageGlobals &stageGlobals);
91 
92 private:
93  const SdfPath _sceneIndexPath;
94  UsdGeomMesh _usdMesh;
95  const UsdImagingDataSourceStageGlobals & _stageGlobals;
96 };
97 
99 
100 // ----------------------------------------------------------------------------
101 
102 /// \class UsdImagingDataSourceMeshPrim
103 ///
104 /// A prim data source representing UsdGeomMesh.
105 ///
107 {
108 public:
110 
111  TfTokenVector GetNames() override;
112  HdDataSourceBaseHandle Get(const TfToken &name) override;
113 
116  UsdPrim const& prim,
117  const TfToken &subprim,
118  const TfTokenVector &properties,
119  UsdImagingPropertyInvalidationType invalidationType);
120 
121 private:
123  const SdfPath &sceneIndexPath,
124  UsdPrim usdPrim,
125  const UsdImagingDataSourceStageGlobals &stageGlobals);
126 };
127 
129 
131 
132 #endif // PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MESH_H
TfTokenVector GetNames() override
TfTokenVector GetNames() override
#define USDIMAGING_API
Definition: api.h:23
static USDIMAGING_API HdDataSourceLocatorSet Invalidate(UsdPrim const &prim, const TfToken &subprim, const TfTokenVector &properties, UsdImagingPropertyInvalidationType invalidationType)
HD_DECLARE_DATASOURCE(UsdImagingDataSourceMeshTopology)
HdDataSourceBaseHandle Get(const TfToken &name) override
HD_DECLARE_DATASOURCE(UsdImagingDataSourceMesh)
TfTokenVector GetNames() override
HdDataSourceBaseHandle Get(const TfToken &name) override
Definition: token.h:70
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
GLuint const GLchar * name
Definition: glcorearb.h:786
Definition: path.h:273
HD_DECLARE_DATASOURCE(UsdImagingDataSourceSubdivisionTags)
HdDataSourceBaseHandle Get(const TfToken &name) override
HdDataSourceBaseHandle Get(const TfToken &name) override
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
TfTokenVector GetNames() override
HD_DECLARE_DATASOURCE(UsdImagingDataSourceMeshPrim)
HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceSubdivisionTags)
UsdImagingPropertyInvalidationType
Definition: types.h:17