HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nurbsPatch.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 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 //
24 #ifndef USDGEOM_GENERATED_NURBSPATCH_H
25 #define USDGEOM_GENERATED_NURBSPATCH_H
26 
27 /// \file usdGeom/nurbsPatch.h
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usdGeom/api.h"
32 #include "pxr/usd/usd/prim.h"
33 #include "pxr/usd/usd/stage.h"
34 #include "pxr/usd/usdGeom/tokens.h"
35 
36 #include "pxr/base/vt/value.h"
37 
38 #include "pxr/base/gf/vec3d.h"
39 #include "pxr/base/gf/vec3f.h"
40 #include "pxr/base/gf/matrix4d.h"
41 
42 #include "pxr/base/tf/token.h"
43 #include "pxr/base/tf/type.h"
44 
46 
47 class SdfAssetPath;
48 
49 // -------------------------------------------------------------------------- //
50 // NURBSPATCH //
51 // -------------------------------------------------------------------------- //
52 
53 /// \class UsdGeomNurbsPatch
54 ///
55 /// Encodes a rational or polynomial non-uniform B-spline
56 /// surface, with optional trim curves.
57 ///
58 /// The encoding mostly follows that of RiNuPatch and RiTrimCurve:
59 /// https://renderman.pixar.com/resources/current/RenderMan/geometricPrimitives.html#rinupatch , with some minor renaming and coalescing for clarity.
60 ///
61 /// The layout of control vertices in the \em points attribute inherited
62 /// from UsdGeomPointBased is row-major with U considered rows, and V columns.
63 ///
64 /// \anchor UsdGeom_NurbsPatch_Form
65 /// <b>NurbsPatch Form</b>
66 ///
67 /// The authored points, orders, knots, weights, and ranges are all that is
68 /// required to render the nurbs patch. However, the only way to model closed
69 /// surfaces with nurbs is to ensure that the first and last control points
70 /// along the given axis are coincident. Similarly, to ensure the surface is
71 /// not only closed but also C2 continuous, the last \em order - 1 control
72 /// points must be (correspondingly) coincident with the first \em order - 1
73 /// control points, and also the spacing of the last corresponding knots
74 /// must be the same as the first corresponding knots.
75 ///
76 /// <b>Form</b> is provided as an aid to interchange between modeling and
77 /// animation applications so that they can robustly identify the intent with
78 /// which the surface was modelled, and take measures (if they are able) to
79 /// preserve the continuity/concidence constraints as the surface may be rigged
80 /// or deformed.
81 /// \li An \em open-form NurbsPatch has no continuity constraints.
82 /// \li A \em closed-form NurbsPatch expects the first and last control points
83 /// to overlap
84 /// \li A \em periodic-form NurbsPatch expects the first and last
85 /// \em order - 1 control points to overlap.
86 ///
87 /// <b>Nurbs vs Subdivision Surfaces</b>
88 ///
89 /// Nurbs are an important modeling primitive in CAD/CAM tools and early
90 /// computer graphics DCC's. Because they have a natural UV parameterization
91 /// they easily support "trim curves", which allow smooth shapes to be
92 /// carved out of the surface.
93 ///
94 /// However, the topology of the patch is always rectangular, and joining two
95 /// nurbs patches together (especially when they have differing numbers of
96 /// spans) is difficult to do smoothly. Also, nurbs are not supported by
97 /// the Ptex texturing technology (http://ptex.us).
98 ///
99 /// Neither of these limitations are shared by subdivision surfaces; therefore,
100 /// although they do not subscribe to trim-curve-based shaping, subdivs are
101 /// often considered a more flexible modeling primitive.
102 ///
103 ///
104 /// For any described attribute \em Fallback \em Value or \em Allowed \em Values below
105 /// that are text/tokens, the actual token is published and defined in \ref UsdGeomTokens.
106 /// So to set an attribute to the value "rightHanded", use UsdGeomTokens->rightHanded
107 /// as the value.
108 ///
110 {
111 public:
112  /// Compile time constant representing what kind of schema this class is.
113  ///
114  /// \sa UsdSchemaKind
116 
117  /// Construct a UsdGeomNurbsPatch on UsdPrim \p prim .
118  /// Equivalent to UsdGeomNurbsPatch::Get(prim.GetStage(), prim.GetPath())
119  /// for a \em valid \p prim, but will not immediately throw an error for
120  /// an invalid \p prim
121  explicit UsdGeomNurbsPatch(const UsdPrim& prim=UsdPrim())
122  : UsdGeomPointBased(prim)
123  {
124  }
125 
126  /// Construct a UsdGeomNurbsPatch on the prim held by \p schemaObj .
127  /// Should be preferred over UsdGeomNurbsPatch(schemaObj.GetPrim()),
128  /// as it preserves SchemaBase state.
129  explicit UsdGeomNurbsPatch(const UsdSchemaBase& schemaObj)
130  : UsdGeomPointBased(schemaObj)
131  {
132  }
133 
134  /// Destructor.
136  virtual ~UsdGeomNurbsPatch();
137 
138  /// Return a vector of names of all pre-declared attributes for this schema
139  /// class and all its ancestor classes. Does not include attributes that
140  /// may be authored by custom/extended methods of the schemas involved.
142  static const TfTokenVector &
143  GetSchemaAttributeNames(bool includeInherited=true);
144 
145  /// Return a UsdGeomNurbsPatch holding the prim adhering to this
146  /// schema at \p path on \p stage. If no prim exists at \p path on
147  /// \p stage, or if the prim at that path does not adhere to this schema,
148  /// return an invalid schema object. This is shorthand for the following:
149  ///
150  /// \code
151  /// UsdGeomNurbsPatch(stage->GetPrimAtPath(path));
152  /// \endcode
153  ///
155  static UsdGeomNurbsPatch
156  Get(const UsdStagePtr &stage, const SdfPath &path);
157 
158  /// Attempt to ensure a \a UsdPrim adhering to this schema at \p path
159  /// is defined (according to UsdPrim::IsDefined()) on this stage.
160  ///
161  /// If a prim adhering to this schema at \p path is already defined on this
162  /// stage, return that prim. Otherwise author an \a SdfPrimSpec with
163  /// \a specifier == \a SdfSpecifierDef and this schema's prim type name for
164  /// the prim at \p path at the current EditTarget. Author \a SdfPrimSpec s
165  /// with \p specifier == \a SdfSpecifierDef and empty typeName at the
166  /// current EditTarget for any nonexistent, or existing but not \a Defined
167  /// ancestors.
168  ///
169  /// The given \a path must be an absolute prim path that does not contain
170  /// any variant selections.
171  ///
172  /// If it is impossible to author any of the necessary PrimSpecs, (for
173  /// example, in case \a path cannot map to the current UsdEditTarget's
174  /// namespace) issue an error and return an invalid \a UsdPrim.
175  ///
176  /// Note that this method may return a defined prim whose typeName does not
177  /// specify this schema class, in case a stronger typeName opinion overrides
178  /// the opinion at the current EditTarget.
179  ///
181  static UsdGeomNurbsPatch
182  Define(const UsdStagePtr &stage, const SdfPath &path);
183 
184 protected:
185  /// Returns the kind of schema this class belongs to.
186  ///
187  /// \sa UsdSchemaKind
189  UsdSchemaKind _GetSchemaKind() const override;
190 
191 private:
192  // needs to invoke _GetStaticTfType.
193  friend class UsdSchemaRegistry;
195  static const TfType &_GetStaticTfType();
196 
197  static bool _IsTypedSchema();
198 
199  // override SchemaBase virtuals.
201  const TfType &_GetTfType() const override;
202 
203 public:
204  // --------------------------------------------------------------------- //
205  // UVERTEXCOUNT
206  // --------------------------------------------------------------------- //
207  /// Number of vertices in the U direction. Should be at least as
208  /// large as uOrder.
209  ///
210  /// | ||
211  /// | -- | -- |
212  /// | Declaration | `int uVertexCount` |
213  /// | C++ Type | int |
214  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
217 
218  /// See GetUVertexCountAttr(), and also
219  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
220  /// If specified, author \p defaultValue as the attribute's default,
221  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
222  /// the default for \p writeSparsely is \c false.
224  UsdAttribute CreateUVertexCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
225 
226 public:
227  // --------------------------------------------------------------------- //
228  // VVERTEXCOUNT
229  // --------------------------------------------------------------------- //
230  /// Number of vertices in the V direction. Should be at least as
231  /// large as vOrder.
232  ///
233  /// | ||
234  /// | -- | -- |
235  /// | Declaration | `int vVertexCount` |
236  /// | C++ Type | int |
237  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
240 
241  /// See GetVVertexCountAttr(), and also
242  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
243  /// If specified, author \p defaultValue as the attribute's default,
244  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
245  /// the default for \p writeSparsely is \c false.
247  UsdAttribute CreateVVertexCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
248 
249 public:
250  // --------------------------------------------------------------------- //
251  // UORDER
252  // --------------------------------------------------------------------- //
253  /// Order in the U direction. Order must be positive and is
254  /// equal to the degree of the polynomial basis to be evaluated, plus 1.
255  ///
256  /// | ||
257  /// | -- | -- |
258  /// | Declaration | `int uOrder` |
259  /// | C++ Type | int |
260  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
262  UsdAttribute GetUOrderAttr() const;
263 
264  /// See GetUOrderAttr(), and also
265  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
266  /// If specified, author \p defaultValue as the attribute's default,
267  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
268  /// the default for \p writeSparsely is \c false.
270  UsdAttribute CreateUOrderAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
271 
272 public:
273  // --------------------------------------------------------------------- //
274  // VORDER
275  // --------------------------------------------------------------------- //
276  /// Order in the V direction. Order must be positive and is
277  /// equal to the degree of the polynomial basis to be evaluated, plus 1.
278  ///
279  /// | ||
280  /// | -- | -- |
281  /// | Declaration | `int vOrder` |
282  /// | C++ Type | int |
283  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
285  UsdAttribute GetVOrderAttr() const;
286 
287  /// See GetVOrderAttr(), and also
288  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
289  /// If specified, author \p defaultValue as the attribute's default,
290  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
291  /// the default for \p writeSparsely is \c false.
293  UsdAttribute CreateVOrderAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
294 
295 public:
296  // --------------------------------------------------------------------- //
297  // UKNOTS
298  // --------------------------------------------------------------------- //
299  /// Knot vector for U direction providing U parameterization.
300  /// The length of this array must be ( uVertexCount + uOrder ), and its
301  /// entries must take on monotonically increasing values.
302  ///
303  /// | ||
304  /// | -- | -- |
305  /// | Declaration | `double[] uKnots` |
306  /// | C++ Type | VtArray<double> |
307  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
309  UsdAttribute GetUKnotsAttr() const;
310 
311  /// See GetUKnotsAttr(), and also
312  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
313  /// If specified, author \p defaultValue as the attribute's default,
314  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
315  /// the default for \p writeSparsely is \c false.
317  UsdAttribute CreateUKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
318 
319 public:
320  // --------------------------------------------------------------------- //
321  // VKNOTS
322  // --------------------------------------------------------------------- //
323  /// Knot vector for V direction providing U parameterization.
324  /// The length of this array must be ( vVertexCount + vOrder ), and its
325  /// entries must take on monotonically increasing values.
326  ///
327  /// | ||
328  /// | -- | -- |
329  /// | Declaration | `double[] vKnots` |
330  /// | C++ Type | VtArray<double> |
331  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
333  UsdAttribute GetVKnotsAttr() const;
334 
335  /// See GetVKnotsAttr(), and also
336  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
337  /// If specified, author \p defaultValue as the attribute's default,
338  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
339  /// the default for \p writeSparsely is \c false.
341  UsdAttribute CreateVKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
342 
343 public:
344  // --------------------------------------------------------------------- //
345  // UFORM
346  // --------------------------------------------------------------------- //
347  /// Interpret the control grid and knot vectors as representing
348  /// an open, geometrically closed, or geometrically closed and C2 continuous
349  /// surface along the U dimension.
350  /// \sa \ref UsdGeom_NurbsPatch_Form "NurbsPatch Form"
351  ///
352  /// | ||
353  /// | -- | -- |
354  /// | Declaration | `uniform token uForm = "open"` |
355  /// | C++ Type | TfToken |
356  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
357  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
358  /// | \ref UsdGeomTokens "Allowed Values" | open, closed, periodic |
360  UsdAttribute GetUFormAttr() const;
361 
362  /// See GetUFormAttr(), and also
363  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
364  /// If specified, author \p defaultValue as the attribute's default,
365  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
366  /// the default for \p writeSparsely is \c false.
368  UsdAttribute CreateUFormAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
369 
370 public:
371  // --------------------------------------------------------------------- //
372  // VFORM
373  // --------------------------------------------------------------------- //
374  /// Interpret the control grid and knot vectors as representing
375  /// an open, geometrically closed, or geometrically closed and C2 continuous
376  /// surface along the V dimension.
377  /// \sa \ref UsdGeom_NurbsPatch_Form "NurbsPatch Form"
378  ///
379  /// | ||
380  /// | -- | -- |
381  /// | Declaration | `uniform token vForm = "open"` |
382  /// | C++ Type | TfToken |
383  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Token |
384  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
385  /// | \ref UsdGeomTokens "Allowed Values" | open, closed, periodic |
387  UsdAttribute GetVFormAttr() const;
388 
389  /// See GetVFormAttr(), and also
390  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
391  /// If specified, author \p defaultValue as the attribute's default,
392  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
393  /// the default for \p writeSparsely is \c false.
395  UsdAttribute CreateVFormAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
396 
397 public:
398  // --------------------------------------------------------------------- //
399  // URANGE
400  // --------------------------------------------------------------------- //
401  /// Provides the minimum and maximum parametric values (as defined
402  /// by uKnots) over which the surface is actually defined. The minimum
403  /// must be less than the maximum, and greater than or equal to the
404  /// value of uKnots[uOrder-1]. The maxium must be less than or equal
405  /// to the last element's value in uKnots.
406  ///
407  /// | ||
408  /// | -- | -- |
409  /// | Declaration | `double2 uRange` |
410  /// | C++ Type | GfVec2d |
411  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double2 |
413  UsdAttribute GetURangeAttr() const;
414 
415  /// See GetURangeAttr(), and also
416  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
417  /// If specified, author \p defaultValue as the attribute's default,
418  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
419  /// the default for \p writeSparsely is \c false.
421  UsdAttribute CreateURangeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
422 
423 public:
424  // --------------------------------------------------------------------- //
425  // VRANGE
426  // --------------------------------------------------------------------- //
427  /// Provides the minimum and maximum parametric values (as defined
428  /// by vKnots) over which the surface is actually defined. The minimum
429  /// must be less than the maximum, and greater than or equal to the
430  /// value of vKnots[vOrder-1]. The maxium must be less than or equal
431  /// to the last element's value in vKnots.
432  ///
433  /// | ||
434  /// | -- | -- |
435  /// | Declaration | `double2 vRange` |
436  /// | C++ Type | GfVec2d |
437  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double2 |
439  UsdAttribute GetVRangeAttr() const;
440 
441  /// See GetVRangeAttr(), and also
442  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
443  /// If specified, author \p defaultValue as the attribute's default,
444  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
445  /// the default for \p writeSparsely is \c false.
447  UsdAttribute CreateVRangeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
448 
449 public:
450  // --------------------------------------------------------------------- //
451  // POINTWEIGHTS
452  // --------------------------------------------------------------------- //
453  /// Optionally provides "w" components for each control point,
454  /// thus must be the same length as the points attribute. If authored,
455  /// the patch will be rational. If unauthored, the patch will be
456  /// polynomial, i.e. weight for all points is 1.0.
457  /// \note Some DCC's pre-weight the \em points, but in this schema,
458  /// \em points are not pre-weighted.
459  ///
460  /// | ||
461  /// | -- | -- |
462  /// | Declaration | `double[] pointWeights` |
463  /// | C++ Type | VtArray<double> |
464  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
467 
468  /// See GetPointWeightsAttr(), and also
469  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
470  /// If specified, author \p defaultValue as the attribute's default,
471  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
472  /// the default for \p writeSparsely is \c false.
474  UsdAttribute CreatePointWeightsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
475 
476 public:
477  // --------------------------------------------------------------------- //
478  // TRIMCURVECOUNTS
479  // --------------------------------------------------------------------- //
480  /// Each element specifies how many curves are present in each
481  /// "loop" of the trimCurve, and the length of the array determines how
482  /// many loops the trimCurve contains. The sum of all elements is the
483  /// total nuber of curves in the trim, to which we will refer as
484  /// \em nCurves in describing the other trim attributes.
485  ///
486  /// | ||
487  /// | -- | -- |
488  /// | Declaration | `int[] trimCurve:counts` |
489  /// | C++ Type | VtArray<int> |
490  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->IntArray |
493 
494  /// See GetTrimCurveCountsAttr(), and also
495  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
496  /// If specified, author \p defaultValue as the attribute's default,
497  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
498  /// the default for \p writeSparsely is \c false.
500  UsdAttribute CreateTrimCurveCountsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
501 
502 public:
503  // --------------------------------------------------------------------- //
504  // TRIMCURVEORDERS
505  // --------------------------------------------------------------------- //
506  /// Flat list of orders for each of the \em nCurves curves.
507  ///
508  /// | ||
509  /// | -- | -- |
510  /// | Declaration | `int[] trimCurve:orders` |
511  /// | C++ Type | VtArray<int> |
512  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->IntArray |
515 
516  /// See GetTrimCurveOrdersAttr(), and also
517  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
518  /// If specified, author \p defaultValue as the attribute's default,
519  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
520  /// the default for \p writeSparsely is \c false.
522  UsdAttribute CreateTrimCurveOrdersAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
523 
524 public:
525  // --------------------------------------------------------------------- //
526  // TRIMCURVEVERTEXCOUNTS
527  // --------------------------------------------------------------------- //
528  /// Flat list of number of vertices for each of the
529  /// \em nCurves curves.
530  ///
531  /// | ||
532  /// | -- | -- |
533  /// | Declaration | `int[] trimCurve:vertexCounts` |
534  /// | C++ Type | VtArray<int> |
535  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->IntArray |
538 
539  /// See GetTrimCurveVertexCountsAttr(), and also
540  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
541  /// If specified, author \p defaultValue as the attribute's default,
542  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
543  /// the default for \p writeSparsely is \c false.
545  UsdAttribute CreateTrimCurveVertexCountsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
546 
547 public:
548  // --------------------------------------------------------------------- //
549  // TRIMCURVEKNOTS
550  // --------------------------------------------------------------------- //
551  /// Flat list of parametric values for each of the
552  /// \em nCurves curves. There will be as many knots as the sum over
553  /// all elements of \em vertexCounts plus the sum over all elements of
554  /// \em orders.
555  ///
556  /// | ||
557  /// | -- | -- |
558  /// | Declaration | `double[] trimCurve:knots` |
559  /// | C++ Type | VtArray<double> |
560  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->DoubleArray |
563 
564  /// See GetTrimCurveKnotsAttr(), and also
565  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
566  /// If specified, author \p defaultValue as the attribute's default,
567  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
568  /// the default for \p writeSparsely is \c false.
570  UsdAttribute CreateTrimCurveKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
571 
572 public:
573  // --------------------------------------------------------------------- //
574  // TRIMCURVERANGES
575  // --------------------------------------------------------------------- //
576  /// Flat list of minimum and maximum parametric values
577  /// (as defined by \em knots) for each of the \em nCurves curves.
578  ///
579  /// | ||
580  /// | -- | -- |
581  /// | Declaration | `double2[] trimCurve:ranges` |
582  /// | C++ Type | VtArray<GfVec2d> |
583  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double2Array |
586 
587  /// See GetTrimCurveRangesAttr(), and also
588  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
589  /// If specified, author \p defaultValue as the attribute's default,
590  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
591  /// the default for \p writeSparsely is \c false.
593  UsdAttribute CreateTrimCurveRangesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
594 
595 public:
596  // --------------------------------------------------------------------- //
597  // TRIMCURVEPOINTS
598  // --------------------------------------------------------------------- //
599  /// Flat list of homogeneous 2D points (u, v, w) that comprise
600  /// the \em nCurves curves. The number of points should be equal to the
601  /// um over all elements of \em vertexCounts.
602  ///
603  /// | ||
604  /// | -- | -- |
605  /// | Declaration | `double3[] trimCurve:points` |
606  /// | C++ Type | VtArray<GfVec3d> |
607  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Double3Array |
610 
611  /// See GetTrimCurvePointsAttr(), and also
612  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
613  /// If specified, author \p defaultValue as the attribute's default,
614  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
615  /// the default for \p writeSparsely is \c false.
617  UsdAttribute CreateTrimCurvePointsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
618 
619 public:
620  // ===================================================================== //
621  // Feel free to add custom code below this line, it will be preserved by
622  // the code generator.
623  //
624  // Just remember to:
625  // - Close the class declaration with };
626  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
627  // - Close the include guard with #endif
628  // ===================================================================== //
629  // --(BEGIN CUSTOM CODE)--
630 };
631 
633 
634 #endif
USDGEOM_API UsdAttribute GetTrimCurveOrdersAttr() const
USDGEOM_API UsdAttribute GetVRangeAttr() const
USDGEOM_API UsdAttribute GetUKnotsAttr() const
USDGEOM_API UsdAttribute CreateVRangeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
USDGEOM_API UsdAttribute CreateUFormAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute GetURangeAttr() const
USDGEOM_API UsdAttribute CreateURangeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute CreateVOrderAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute CreateTrimCurveRangesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
static const UsdSchemaKind schemaKind
Definition: nurbsPatch.h:115
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
USDGEOM_API UsdAttribute GetTrimCurveVertexCountsAttr() const
USDGEOM_API UsdAttribute CreateTrimCurvePointsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
UsdSchemaKind
Definition: common.h:127
static USDGEOM_API UsdGeomNurbsPatch Define(const UsdStagePtr &stage, const SdfPath &path)
USDGEOM_API UsdAttribute GetUFormAttr() const
USDGEOM_API UsdAttribute CreateVVertexCountAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute CreateTrimCurveVertexCountsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute GetVOrderAttr() const
USDGEOM_API UsdAttribute GetTrimCurveRangesAttr() const
USDGEOM_API UsdAttribute CreateTrimCurveCountsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
static USDGEOM_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Represents a concrete typed schema.
Definition: prim.h:132
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
USDGEOM_API UsdAttribute GetVVertexCountAttr() const
USDGEOM_API UsdAttribute GetTrimCurvePointsAttr() const
static USDGEOM_API UsdGeomNurbsPatch Get(const UsdStagePtr &stage, const SdfPath &path)
Definition: path.h:288
USDGEOM_API UsdAttribute GetUOrderAttr() const
USDGEOM_API UsdAttribute GetVFormAttr() const
USDGEOM_API UsdAttribute GetTrimCurveKnotsAttr() const
USDGEOM_API UsdAttribute CreateUVertexCountAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1375
USDGEOM_API UsdAttribute CreateTrimCurveKnotsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute CreateVFormAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute GetUVertexCountAttr() const
USDGEOM_API UsdAttribute CreateUKnotsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute CreateUOrderAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute CreatePointWeightsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute CreateTrimCurveOrdersAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute CreateVKnotsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
USDGEOM_API UsdAttribute GetVKnotsAttr() const
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
USDGEOM_API UsdAttribute GetPointWeightsAttr() const
Definition: type.h:64
UsdGeomNurbsPatch(const UsdPrim &prim=UsdPrim())
Definition: nurbsPatch.h:121
#define USDGEOM_API
Definition: api.h:40
UsdGeomNurbsPatch(const UsdSchemaBase &schemaObj)
Definition: nurbsPatch.h:129
USDGEOM_API UsdAttribute GetTrimCurveCountsAttr() const
Definition: value.h:168
virtual USDGEOM_API ~UsdGeomNurbsPatch()
Destructor.