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