Loading...
Searching...
No Matches
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 const SdfPath &sceneIndexPath,
34 UsdGeomMesh usdMesh,
35 const UsdImagingDataSourceStageGlobals &stageGlobals);
36
37private:
38 const SdfPath _sceneIndexPath;
39 UsdGeomMesh _usdMesh;
40 const UsdImagingDataSourceStageGlobals & _stageGlobals;
41};
42
43HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceSubdivisionTags);
44
45// ----------------------------------------------------------------------------
46
52{
53public:
54 HD_DECLARE_DATASOURCE(UsdImagingDataSourceMeshTopology);
55
57 HdDataSourceBaseHandle Get(const TfToken &name) override;
58
59private:
61 const SdfPath &sceneIndexPath,
62 UsdGeomMesh usdMesh,
63 const UsdImagingDataSourceStageGlobals &stageGlobals);
64
65private:
66 const SdfPath _sceneIndexPath;
67 UsdGeomMesh _usdMesh;
68 const UsdImagingDataSourceStageGlobals & _stageGlobals;
69};
70
71HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceMeshTopology);
72
73// ----------------------------------------------------------------------------
74
75
81{
82public:
83 HD_DECLARE_DATASOURCE(UsdImagingDataSourceMesh);
84
86 HdDataSourceBaseHandle Get(const TfToken &name) override;
87
88private:
90 const SdfPath &sceneIndexPath,
91 UsdGeomMesh usdMesh,
92 const UsdImagingDataSourceStageGlobals &stageGlobals);
93
94private:
95 const SdfPath _sceneIndexPath;
96 UsdGeomMesh _usdMesh;
97 const UsdImagingDataSourceStageGlobals & _stageGlobals;
98};
99
100HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceMesh);
101
102// ----------------------------------------------------------------------------
103
109{
110public:
111 HD_DECLARE_DATASOURCE(UsdImagingDataSourceMeshPrim);
112
114 HdDataSourceBaseHandle Get(const TfToken &name) override;
115
116 USDIMAGING_API
117 static HdDataSourceLocatorSet Invalidate(
118 UsdPrim const& prim,
119 const TfToken &subprim,
120 const TfTokenVector &properties,
121 UsdImagingPropertyInvalidationType invalidationType);
122
123private:
125 const SdfPath &sceneIndexPath,
126 UsdPrim usdPrim,
127 const UsdImagingDataSourceStageGlobals &stageGlobals);
128};
129
130HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceMeshPrim);
131
132PXR_NAMESPACE_CLOSE_SCOPE
133
134#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:148
Represents a set of data source locators closed under descendancy.
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:81
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 child datasource of the given name.
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:489