All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
nurbsPatchSchema.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_NURBS_PATCH_SCHEMA_H
19#define PXR_IMAGING_HD_NURBS_PATCH_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_NURBS_PATCH_SCHEMA_TOKENS \
37 (nurbsPatch) \
38 (uVertexCount) \
39 (vVertexCount) \
40 (uOrder) \
41 (vOrder) \
42 (uKnots) \
43 (vKnots) \
44 (uForm) \
45 (vForm) \
46 (uRange) \
47 (vRange) \
48 (trimCurve) \
49 (orientation) \
50 (doubleSided) \
51 (open) \
52 (closed) \
53 (periodic) \
54 (leftHanded) \
55 (rightHanded) \
56
57TF_DECLARE_PUBLIC_TOKENS(HdNurbsPatchSchemaTokens, HD_API,
58 HD_NURBS_PATCH_SCHEMA_TOKENS);
59
60//-----------------------------------------------------------------------------
61
62
63class HdNurbsPatchSchema : public HdSchema
64{
65public:
68
69 HdNurbsPatchSchema(HdContainerDataSourceHandle container)
70 : HdSchema(container) {}
71
77 HD_API
78 static HdNurbsPatchSchema GetFromParent(
79 const HdContainerDataSourceHandle &fromParentContainer);
80
82
83// --(BEGIN CUSTOM CODE: Schema Methods)--
84// --(END CUSTOM CODE: Schema Methods)--
85
88
89 HD_API
90 HdIntDataSourceHandle GetUVertexCount() const;
91
92 HD_API
93 HdIntDataSourceHandle GetVVertexCount() const;
94
95 HD_API
96 HdIntDataSourceHandle GetUOrder() const;
97
98 HD_API
99 HdIntDataSourceHandle GetVOrder() const;
100
101 HD_API
102 HdDoubleArrayDataSourceHandle GetUKnots() const;
103
104 HD_API
105 HdDoubleArrayDataSourceHandle GetVKnots() const;
106
107 HD_API
108 HdTokenDataSourceHandle GetUForm() const;
109
110 HD_API
111 HdTokenDataSourceHandle GetVForm() const;
112
113 HD_API
114 HdVec2dDataSourceHandle GetURange() const;
115
116 HD_API
117 HdVec2dDataSourceHandle GetVRange() const;
118
119 HD_API
120 HdNurbsPatchTrimCurveSchema GetTrimCurve() const;
121
122 HD_API
123 HdTokenDataSourceHandle GetOrientation() const;
124
125 HD_API
126 HdBoolDataSourceHandle GetDoubleSided() const;
127
129
132
135 HD_API
136 static const TfToken &GetSchemaToken();
137
140 HD_API
141 static const HdDataSourceLocator &GetDefaultLocator();
142
144
147
155 HD_API
156 static HdContainerDataSourceHandle
157 BuildRetained(
158 const HdIntDataSourceHandle &uVertexCount,
159 const HdIntDataSourceHandle &vVertexCount,
160 const HdIntDataSourceHandle &uOrder,
161 const HdIntDataSourceHandle &vOrder,
162 const HdDoubleArrayDataSourceHandle &uKnots,
163 const HdDoubleArrayDataSourceHandle &vKnots,
164 const HdTokenDataSourceHandle &uForm,
165 const HdTokenDataSourceHandle &vForm,
166 const HdVec2dDataSourceHandle &uRange,
167 const HdVec2dDataSourceHandle &vRange,
168 const HdContainerDataSourceHandle &trimCurve,
169 const HdTokenDataSourceHandle &orientation,
170 const HdBoolDataSourceHandle &doubleSided
171 );
172
180 {
181 public:
182 HD_API
183 Builder &SetUVertexCount(
184 const HdIntDataSourceHandle &uVertexCount);
185 HD_API
186 Builder &SetVVertexCount(
187 const HdIntDataSourceHandle &vVertexCount);
188 HD_API
189 Builder &SetUOrder(
190 const HdIntDataSourceHandle &uOrder);
191 HD_API
192 Builder &SetVOrder(
193 const HdIntDataSourceHandle &vOrder);
194 HD_API
195 Builder &SetUKnots(
196 const HdDoubleArrayDataSourceHandle &uKnots);
197 HD_API
198 Builder &SetVKnots(
199 const HdDoubleArrayDataSourceHandle &vKnots);
200 HD_API
201 Builder &SetUForm(
202 const HdTokenDataSourceHandle &uForm);
203 HD_API
204 Builder &SetVForm(
205 const HdTokenDataSourceHandle &vForm);
206 HD_API
207 Builder &SetURange(
208 const HdVec2dDataSourceHandle &uRange);
209 HD_API
210 Builder &SetVRange(
211 const HdVec2dDataSourceHandle &vRange);
212 HD_API
213 Builder &SetTrimCurve(
214 const HdContainerDataSourceHandle &trimCurve);
215 HD_API
216 Builder &SetOrientation(
217 const HdTokenDataSourceHandle &orientation);
218 HD_API
219 Builder &SetDoubleSided(
220 const HdBoolDataSourceHandle &doubleSided);
221
223 HD_API
224 HdContainerDataSourceHandle Build();
225
226 private:
227 HdIntDataSourceHandle _uVertexCount;
228 HdIntDataSourceHandle _vVertexCount;
229 HdIntDataSourceHandle _uOrder;
230 HdIntDataSourceHandle _vOrder;
231 HdDoubleArrayDataSourceHandle _uKnots;
232 HdDoubleArrayDataSourceHandle _vKnots;
233 HdTokenDataSourceHandle _uForm;
234 HdTokenDataSourceHandle _vForm;
235 HdVec2dDataSourceHandle _uRange;
236 HdVec2dDataSourceHandle _vRange;
237 HdContainerDataSourceHandle _trimCurve;
238 HdTokenDataSourceHandle _orientation;
239 HdBoolDataSourceHandle _doubleSided;
240
241 };
242
250 HD_API
251 static HdTokenDataSourceHandle BuildFormDataSource(
252 const TfToken &form);
253
260 HD_API
261 static HdTokenDataSourceHandle BuildOrientationDataSource(
262 const TfToken &orientation);
263
265};
266
267PXR_NAMESPACE_CLOSE_SCOPE
268
269#endif
Represents an object that can identify the location of a data source.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
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:71
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:81