Loading...
Searching...
No Matches
nurbsPatchSchema.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
5// with the following modification; you may not use this file except in
6// compliance with the Apache License and the following modification to it:
7// Section 6. Trademarks. is deleted and replaced with:
8//
9// 6. Trademarks. This License does not grant permission to use the trade
10// names, trademarks, service marks, or product names of the Licensor
11// and its affiliates, except as required to comply with Section 4(c) of
12// the License and to reproduce the content of the NOTICE file.
13//
14// You may obtain a copy of the Apache License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software
19// distributed under the Apache License with the above modification is
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21// KIND, either express or implied. See the Apache License for the specific
22// language governing permissions and limitations under the Apache License.
23//
25
26/* ************************************************************************** */
27/* ** ** */
28/* ** This file is generated by a script. ** */
29/* ** ** */
30/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
31/* ** Edit hdSchemaDefs.py instead to make changes. ** */
32/* ** ** */
33/* ************************************************************************** */
34
35#ifndef PXR_IMAGING_HD_NURBS_PATCH_SCHEMA_H
36#define PXR_IMAGING_HD_NURBS_PATCH_SCHEMA_H
37
39
40#include "pxr/imaging/hd/api.h"
42
43#include "pxr/imaging/hd/schema.h"
44
45// --(BEGIN CUSTOM CODE: Includes)--
46// --(END CUSTOM CODE: Includes)--
47
48PXR_NAMESPACE_OPEN_SCOPE
49
50// --(BEGIN CUSTOM CODE: Declares)--
51// --(END CUSTOM CODE: Declares)--
52
53#define HD_NURBS_PATCH_SCHEMA_TOKENS \
54 (nurbsPatch) \
55 (uVertexCount) \
56 (vVertexCount) \
57 (uOrder) \
58 (vOrder) \
59 (uKnots) \
60 (vKnots) \
61 (uForm) \
62 (vForm) \
63 (uRange) \
64 (vRange) \
65 (trimCurve) \
66 (orientation) \
67 (doubleSided) \
68 (open) \
69 (closed) \
70 (periodic) \
71 (leftHanded) \
72 (rightHanded) \
73
74TF_DECLARE_PUBLIC_TOKENS(HdNurbsPatchSchemaTokens, HD_API,
75 HD_NURBS_PATCH_SCHEMA_TOKENS);
76
77//-----------------------------------------------------------------------------
78
79
80class HdNurbsPatchSchema : public HdSchema
81{
82public:
85
86 HdNurbsPatchSchema(HdContainerDataSourceHandle container)
87 : HdSchema(container) {}
88
94 HD_API
95 static HdNurbsPatchSchema GetFromParent(
96 const HdContainerDataSourceHandle &fromParentContainer);
97
99
100// --(BEGIN CUSTOM CODE: Schema Methods)--
101// --(END CUSTOM CODE: Schema Methods)--
102
105
106 HD_API
107 HdIntDataSourceHandle GetUVertexCount() const;
108
109 HD_API
110 HdIntDataSourceHandle GetVVertexCount() const;
111
112 HD_API
113 HdIntDataSourceHandle GetUOrder() const;
114
115 HD_API
116 HdIntDataSourceHandle GetVOrder() const;
117
118 HD_API
119 HdDoubleArrayDataSourceHandle GetUKnots() const;
120
121 HD_API
122 HdDoubleArrayDataSourceHandle GetVKnots() const;
123
124 HD_API
125 HdTokenDataSourceHandle GetUForm() const;
126
127 HD_API
128 HdTokenDataSourceHandle GetVForm() const;
129
130 HD_API
131 HdVec2dDataSourceHandle GetURange() const;
132
133 HD_API
134 HdVec2dDataSourceHandle GetVRange() const;
135
136 HD_API
137 HdNurbsPatchTrimCurveSchema GetTrimCurve() const;
138
139 HD_API
140 HdTokenDataSourceHandle GetOrientation() const;
141
142 HD_API
143 HdBoolDataSourceHandle GetDoubleSided() const;
144
146
149
152 HD_API
153 static const TfToken &GetSchemaToken();
154
157 HD_API
158 static const HdDataSourceLocator &GetDefaultLocator();
159
161
164
172 HD_API
173 static HdContainerDataSourceHandle
174 BuildRetained(
175 const HdIntDataSourceHandle &uVertexCount,
176 const HdIntDataSourceHandle &vVertexCount,
177 const HdIntDataSourceHandle &uOrder,
178 const HdIntDataSourceHandle &vOrder,
179 const HdDoubleArrayDataSourceHandle &uKnots,
180 const HdDoubleArrayDataSourceHandle &vKnots,
181 const HdTokenDataSourceHandle &uForm,
182 const HdTokenDataSourceHandle &vForm,
183 const HdVec2dDataSourceHandle &uRange,
184 const HdVec2dDataSourceHandle &vRange,
185 const HdContainerDataSourceHandle &trimCurve,
186 const HdTokenDataSourceHandle &orientation,
187 const HdBoolDataSourceHandle &doubleSided
188 );
189
197 {
198 public:
199 HD_API
200 Builder &SetUVertexCount(
201 const HdIntDataSourceHandle &uVertexCount);
202 HD_API
203 Builder &SetVVertexCount(
204 const HdIntDataSourceHandle &vVertexCount);
205 HD_API
206 Builder &SetUOrder(
207 const HdIntDataSourceHandle &uOrder);
208 HD_API
209 Builder &SetVOrder(
210 const HdIntDataSourceHandle &vOrder);
211 HD_API
212 Builder &SetUKnots(
213 const HdDoubleArrayDataSourceHandle &uKnots);
214 HD_API
215 Builder &SetVKnots(
216 const HdDoubleArrayDataSourceHandle &vKnots);
217 HD_API
218 Builder &SetUForm(
219 const HdTokenDataSourceHandle &uForm);
220 HD_API
221 Builder &SetVForm(
222 const HdTokenDataSourceHandle &vForm);
223 HD_API
224 Builder &SetURange(
225 const HdVec2dDataSourceHandle &uRange);
226 HD_API
227 Builder &SetVRange(
228 const HdVec2dDataSourceHandle &vRange);
229 HD_API
230 Builder &SetTrimCurve(
231 const HdContainerDataSourceHandle &trimCurve);
232 HD_API
233 Builder &SetOrientation(
234 const HdTokenDataSourceHandle &orientation);
235 HD_API
236 Builder &SetDoubleSided(
237 const HdBoolDataSourceHandle &doubleSided);
238
240 HD_API
241 HdContainerDataSourceHandle Build();
242
243 private:
244 HdIntDataSourceHandle _uVertexCount;
245 HdIntDataSourceHandle _vVertexCount;
246 HdIntDataSourceHandle _uOrder;
247 HdIntDataSourceHandle _vOrder;
248 HdDoubleArrayDataSourceHandle _uKnots;
249 HdDoubleArrayDataSourceHandle _vKnots;
250 HdTokenDataSourceHandle _uForm;
251 HdTokenDataSourceHandle _vForm;
252 HdVec2dDataSourceHandle _uRange;
253 HdVec2dDataSourceHandle _vRange;
254 HdContainerDataSourceHandle _trimCurve;
255 HdTokenDataSourceHandle _orientation;
256 HdBoolDataSourceHandle _doubleSided;
257
258 };
259
267 HD_API
268 static HdTokenDataSourceHandle BuildFormDataSource(
269 const TfToken &form);
270
277 HD_API
278 static HdTokenDataSourceHandle BuildOrientationDataSource(
279 const TfToken &orientation);
280
282};
283
284PXR_NAMESPACE_CLOSE_SCOPE
285
286#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:43
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:98