Loading...
Searching...
No Matches
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
17PXR_NAMESPACE_OPEN_SCOPE
18
19// ----------------------------------------------------------------------------
20
26{
27public:
28 HD_DECLARE_DATASOURCE(UsdImagingDataSourceTetMeshTopology);
29
31 HdDataSourceBaseHandle Get(const TfToken &name) override;
32
33private:
35 const SdfPath &sceneIndexPath,
36 UsdGeomTetMesh usdTetMesh,
37 const UsdImagingDataSourceStageGlobals &stageGlobals);
38
39private:
40 const SdfPath _sceneIndexPath;
41 UsdGeomTetMesh _usdTetMesh;
42 const UsdImagingDataSourceStageGlobals & _stageGlobals;
43};
44
45HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceTetMeshTopology);
46
47// ----------------------------------------------------------------------------
48
54{
55public:
56 HD_DECLARE_DATASOURCE(UsdImagingDataSourceTetMesh);
57
59 HdDataSourceBaseHandle Get(const TfToken &name) override;
60
61private:
63 const SdfPath &sceneIndexPath,
64 UsdGeomTetMesh usdTetMesh,
65 const UsdImagingDataSourceStageGlobals &stageGlobals);
66
67private:
68 const SdfPath _sceneIndexPath;
69 UsdGeomTetMesh _usdTetMesh;
70 const UsdImagingDataSourceStageGlobals & _stageGlobals;
71};
72
73HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceTetMesh);
74
75// ----------------------------------------------------------------------------
76
82{
83public:
84 HD_DECLARE_DATASOURCE(UsdImagingDataSourceTetMeshPrim);
85
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
96private:
98 const SdfPath &sceneIndexPath,
99 UsdPrim usdPrim,
100 const UsdImagingDataSourceStageGlobals &stageGlobals);
101};
102
103HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceTetMeshPrim);
104
105PXR_NAMESPACE_CLOSE_SCOPE
106
107#endif // PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_TET_MESH_H
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
Definition: dataSource.h:99
Represents a set of data source locators closed under descendancy.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
Encodes a tetrahedral mesh.
Definition: tetMesh.h:51
Data source representing a USD gprim.
This class is used as a context object with global stage information, that gets passed down to dataso...
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.
A prim data source representing UsdGeomTetMesh.
TfTokenVector GetNames() override
Returns the names for which this data source can return meaningful results.
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the data source representing name, if valid.
A container data source representing tet mesh topology.
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.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440