dataSourceTetMesh.h
1 //
2 // Copyright 2024 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_TET_MESH_H
8 #define PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_TET_MESH_H
9 
10 #include "pxr/usdImaging/usdImaging/dataSourceGprim.h"
11 #include "pxr/usdImaging/usdImaging/dataSourceStageGlobals.h"
12 
14 
15 #include "pxr/imaging/hd/dataSource.h"
16 
17 PXR_NAMESPACE_OPEN_SCOPE
18 
19 // ----------------------------------------------------------------------------
20 
26 {
27 public:
28  HD_DECLARE_DATASOURCE(UsdImagingDataSourceTetMeshTopology);
29 
30  TfTokenVector GetNames() override;
31  HdDataSourceBaseHandle Get(const TfToken &name) override;
32 
33 private:
35  const SdfPath &sceneIndexPath,
36  UsdGeomTetMesh usdTetMesh,
37  const UsdImagingDataSourceStageGlobals &stageGlobals);
38 
39 private:
40  const SdfPath _sceneIndexPath;
41  UsdGeomTetMesh _usdTetMesh;
42  const UsdImagingDataSourceStageGlobals & _stageGlobals;
43 };
44 
45 HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceTetMeshTopology);
46 
47 // ----------------------------------------------------------------------------
48 
54 {
55 public:
56  HD_DECLARE_DATASOURCE(UsdImagingDataSourceTetMesh);
57 
58  TfTokenVector GetNames() override;
59  HdDataSourceBaseHandle Get(const TfToken &name) override;
60 
61 private:
63  const SdfPath &sceneIndexPath,
64  UsdGeomTetMesh usdTetMesh,
65  const UsdImagingDataSourceStageGlobals &stageGlobals);
66 
67 private:
68  const SdfPath _sceneIndexPath;
69  UsdGeomTetMesh _usdTetMesh;
70  const UsdImagingDataSourceStageGlobals & _stageGlobals;
71 };
72 
73 HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceTetMesh);
74 
75 // ----------------------------------------------------------------------------
76 
82 {
83 public:
84  HD_DECLARE_DATASOURCE(UsdImagingDataSourceTetMeshPrim);
85 
86  TfTokenVector GetNames() override;
87  HdDataSourceBaseHandle Get(const TfToken &name) override;
88 
89  USDIMAGING_API
90  static HdDataSourceLocatorSet Invalidate(
91  UsdPrim const& prim,
92  const TfToken &subprim,
93  const TfTokenVector &properties,
94  UsdImagingPropertyInvalidationType invalidationType);
95 
96 private:
98  const SdfPath &sceneIndexPath,
99  UsdPrim usdPrim,
100  const UsdImagingDataSourceStageGlobals &stageGlobals);
101 };
102 
103 HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceTetMeshPrim);
104 
105 PXR_NAMESPACE_CLOSE_SCOPE
106 
107 #endif // PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_TET_MESH_H
A container data source representing tet mesh topology.
Data source representing a USD gprim.
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
Definition: dataSource.h:147
Encodes a tetrahedral mesh.
Definition: tetMesh.h:50
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:80
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
This class is used as a context object with global stage information, that gets passed down to dataso...
Represents a set of data source locators closed under descendancy.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:489
A prim data source representing UsdGeomTetMesh.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:280
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
A container data source representing data unique to tet meshes.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.