Loading...
Searching...
No Matches
meshTopologySchema.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
8
9/* ************************************************************************** */
10/* ** ** */
11/* ** This file is generated by a script. ** */
12/* ** ** */
13/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14/* ** Edit hdSchemaDefs.py instead to make changes. ** */
15/* ** ** */
16/* ************************************************************************** */
17
18#ifndef PXR_IMAGING_HD_MESH_TOPOLOGY_SCHEMA_H
19#define PXR_IMAGING_HD_MESH_TOPOLOGY_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
25
26#include "pxr/imaging/hd/schema.h"
27
28// --(BEGIN CUSTOM CODE: Includes)--
29// --(END CUSTOM CODE: Includes)--
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33// --(BEGIN CUSTOM CODE: Declares)--
34// --(END CUSTOM CODE: Declares)--
35
36#define HD_MESH_TOPOLOGY_SCHEMA_TOKENS \
37 (topology) \
38 (faceVertexCounts) \
39 (faceVertexIndices) \
40 (holeIndices) \
41 (orientation) \
42 (leftHanded) \
43 (rightHanded) \
44
45TF_DECLARE_PUBLIC_TOKENS(HdMeshTopologySchemaTokens, HD_API,
46 HD_MESH_TOPOLOGY_SCHEMA_TOKENS);
47
48//-----------------------------------------------------------------------------
49
50
53class HdMeshTopologySchema : public HdSchema
54{
55public:
58
59 HdMeshTopologySchema(HdContainerDataSourceHandle container)
60 : HdSchema(container) {}
61
67 HD_API
68 static HdMeshTopologySchema GetFromParent(
69 const HdContainerDataSourceHandle &fromParentContainer);
70
72
73// --(BEGIN CUSTOM CODE: Schema Methods)--
74// --(END CUSTOM CODE: Schema Methods)--
75
78
79 HD_API
80 HdIntArrayDataSourceHandle GetFaceVertexCounts() const;
81
82 HD_API
83 HdIntArrayDataSourceHandle GetFaceVertexIndices() const;
84
85 HD_API
86 HdIntArrayDataSourceHandle GetHoleIndices() const;
87
88 HD_API
89 HdTokenDataSourceHandle GetOrientation() const;
90
92
95
98 HD_API
99 static const TfToken &GetSchemaToken();
100
103 HD_API
104 static const HdDataSourceLocator &GetDefaultLocator();
105
107
116
118 HD_API
119 static const HdDataSourceLocator &GetFaceVertexCountsLocator();
120
122 HD_API
123 static const HdDataSourceLocator &GetFaceVertexIndicesLocator();
124
126 HD_API
127 static const HdDataSourceLocator &GetHoleIndicesLocator();
128
130 HD_API
131 static const HdDataSourceLocator &GetOrientationLocator();
133
136
144 HD_API
145 static HdContainerDataSourceHandle
146 BuildRetained(
147 const HdIntArrayDataSourceHandle &faceVertexCounts,
148 const HdIntArrayDataSourceHandle &faceVertexIndices,
149 const HdIntArrayDataSourceHandle &holeIndices,
150 const HdTokenDataSourceHandle &orientation
151 );
152
159 class Builder
160 {
161 public:
162 HD_API
163 Builder &SetFaceVertexCounts(
164 const HdIntArrayDataSourceHandle &faceVertexCounts);
165 HD_API
166 Builder &SetFaceVertexIndices(
167 const HdIntArrayDataSourceHandle &faceVertexIndices);
168 HD_API
169 Builder &SetHoleIndices(
170 const HdIntArrayDataSourceHandle &holeIndices);
171 HD_API
172 Builder &SetOrientation(
173 const HdTokenDataSourceHandle &orientation);
174
176 HD_API
177 HdContainerDataSourceHandle Build();
178
179 private:
180 HdIntArrayDataSourceHandle _faceVertexCounts;
181 HdIntArrayDataSourceHandle _faceVertexIndices;
182 HdIntArrayDataSourceHandle _holeIndices;
183 HdTokenDataSourceHandle _orientation;
184
185 };
186
193 HD_API
194 static HdTokenDataSourceHandle BuildOrientationDataSource(
195 const TfToken &orientation);
196
198};
199
200PXR_NAMESPACE_CLOSE_SCOPE
201
202#endif
Represents an object that can identify the location of a data source.
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition schema.h:26
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:81
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.