All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dataSourceMesh.h
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
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
24{
25public:
26 HD_DECLARE_DATASOURCE(UsdImagingDataSourceSubdivisionTags);
27
29 HdDataSourceBaseHandle Get(const TfToken &name) override;
30
31private:
33 UsdGeomMesh usdMesh,
34 const UsdImagingDataSourceStageGlobals &stageGlobals);
35
36private:
37 UsdGeomMesh _usdMesh;
38 const UsdImagingDataSourceStageGlobals & _stageGlobals;
39};
40
41HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceSubdivisionTags);
42
43// ----------------------------------------------------------------------------
44
50{
51public:
52 HD_DECLARE_DATASOURCE(UsdImagingDataSourceMeshTopology);
53
55 HdDataSourceBaseHandle Get(const TfToken &name) override;
56
57private:
59 const SdfPath &sceneIndexPath,
60 UsdGeomMesh usdMesh,
61 const UsdImagingDataSourceStageGlobals &stageGlobals);
62
63private:
64 const SdfPath _sceneIndexPath;
65 UsdGeomMesh _usdMesh;
66 const UsdImagingDataSourceStageGlobals & _stageGlobals;
67};
68
69HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceMeshTopology);
70
71// ----------------------------------------------------------------------------
72
73
79{
80public:
81 HD_DECLARE_DATASOURCE(UsdImagingDataSourceMesh);
82
84 HdDataSourceBaseHandle Get(const TfToken &name) override;
85
86private:
88 const SdfPath &sceneIndexPath,
89 UsdGeomMesh usdMesh,
90 const UsdImagingDataSourceStageGlobals &stageGlobals);
91
92private:
93 const SdfPath _sceneIndexPath;
94 UsdGeomMesh _usdMesh;
95 const UsdImagingDataSourceStageGlobals & _stageGlobals;
96};
97
98HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceMesh);
99
100// ----------------------------------------------------------------------------
101
107{
108public:
109 HD_DECLARE_DATASOURCE(UsdImagingDataSourceMeshPrim);
110
112 HdDataSourceBaseHandle Get(const TfToken &name) override;
113
114 USDIMAGING_API
115 static HdDataSourceLocatorSet Invalidate(
116 UsdPrim const& prim,
117 const TfToken &subprim,
118 const TfTokenVector &properties,
119 UsdImagingPropertyInvalidationType invalidationType);
120
121private:
123 const SdfPath &sceneIndexPath,
124 UsdPrim usdPrim,
125 const UsdImagingDataSourceStageGlobals &stageGlobals);
126};
127
128HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceMeshPrim);
129
130PXR_NAMESPACE_CLOSE_SCOPE
131
132#endif // PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_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 mesh with optional subdivision properties and features.
Definition: mesh.h:117
Data source representing a USD gprim.
A container data source representing data unique to 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 UsdGeomMesh.
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 data source representing name, if valid.
A container data source representing 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.
This class is used as a context object with global stage information, that gets passed down to dataso...
A container data source representing subdivision tags.
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