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 Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MESH_H
25 #define PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MESH_H
26 
29 
30 #include "pxr/usd/usdGeom/mesh.h"
31 
33 
35 
36 /// \class UsdImagingDataSourceSubdivisionTags
37 ///
38 /// A container data source representing subdivision tags.
39 ///
41 {
42 public:
44 
45  TfTokenVector GetNames() override;
46  HdDataSourceBaseHandle Get(const TfToken &name) override;
47 
48 private:
50  UsdGeomMesh usdMesh,
51  const UsdImagingDataSourceStageGlobals &stageGlobals);
52 
53 private:
54  UsdGeomMesh _usdMesh;
55  const UsdImagingDataSourceStageGlobals & _stageGlobals;
56 };
57 
59 
60 // ----------------------------------------------------------------------------
61 
62 /// \class UsdImagingDataSourceMeshTopology
63 ///
64 /// A container data source representing mesh topology.
65 ///
67 {
68 public:
70 
71  TfTokenVector GetNames() override;
72  HdDataSourceBaseHandle Get(const TfToken &name) override;
73 
74 private:
76  const SdfPath &sceneIndexPath,
77  UsdGeomMesh usdMesh,
78  const UsdImagingDataSourceStageGlobals &stageGlobals);
79 
80 private:
81  const SdfPath _sceneIndexPath;
82  UsdGeomMesh _usdMesh;
83  const UsdImagingDataSourceStageGlobals & _stageGlobals;
84 };
85 
87 
88 // ----------------------------------------------------------------------------
89 
90 
91 /// \class UsdImagingDataSourceMesh
92 ///
93 /// A container data source representing data unique to meshes
94 ///
96 {
97 public:
99 
100  TfTokenVector GetNames() override;
101  HdDataSourceBaseHandle Get(const TfToken &name) override;
102 
103 private:
105  const SdfPath &sceneIndexPath,
106  UsdGeomMesh usdMesh,
107  const UsdImagingDataSourceStageGlobals &stageGlobals);
108 
109 private:
110  const SdfPath _sceneIndexPath;
111  UsdGeomMesh _usdMesh;
112  const UsdImagingDataSourceStageGlobals & _stageGlobals;
113 };
114 
116 
117 // ----------------------------------------------------------------------------
118 
119 /// \class UsdImagingDataSourceMeshPrim
120 ///
121 /// A prim data source representing UsdGeomMesh.
122 ///
124 {
125 public:
127 
128  TfTokenVector GetNames() override;
129  HdDataSourceBaseHandle Get(const TfToken &name) override;
130 
133  UsdPrim const& prim,
134  const TfToken &subprim,
135  const TfTokenVector &properties,
136  UsdImagingPropertyInvalidationType invalidationType);
137 
138 private:
140  const SdfPath &sceneIndexPath,
141  UsdPrim usdPrim,
142  const UsdImagingDataSourceStageGlobals &stageGlobals);
143 };
144 
146 
148 
149 #endif // PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MESH_H
TfTokenVector GetNames() override
TfTokenVector GetNames() override
#define USDIMAGING_API
Definition: api.h:40
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:87
Definition: prim.h:133
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:457
GLuint const GLchar * name
Definition: glcorearb.h:786
Definition: path.h:290
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:1432
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
TfTokenVector GetNames() override
HD_DECLARE_DATASOURCE(UsdImagingDataSourceMeshPrim)
HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceSubdivisionTags)
UsdImagingPropertyInvalidationType
Definition: types.h:34