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 UsdSchemaType
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 type of schema this class belongs to.
186  ///
187  /// \sa UsdSchemaType
189  UsdSchemaType _GetSchemaType() 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  /// \n C++ Type: int
211  /// \n Usd Type: SdfValueTypeNames->Int
212  /// \n Variability: SdfVariabilityVarying
213  /// \n Fallback Value: No Fallback
216 
217  /// See GetUVertexCountAttr(), and also
218  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
219  /// If specified, author \p defaultValue as the attribute's default,
220  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
221  /// the default for \p writeSparsely is \c false.
223  UsdAttribute CreateUVertexCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
224 
225 public:
226  // --------------------------------------------------------------------- //
227  // VVERTEXCOUNT
228  // --------------------------------------------------------------------- //
229  /// Number of vertices in the V direction. Should be at least as
230  /// large as vOrder.
231  ///
232  /// \n C++ Type: int
233  /// \n Usd Type: SdfValueTypeNames->Int
234  /// \n Variability: SdfVariabilityVarying
235  /// \n Fallback Value: No Fallback
238 
239  /// See GetVVertexCountAttr(), and also
240  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
241  /// If specified, author \p defaultValue as the attribute's default,
242  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
243  /// the default for \p writeSparsely is \c false.
245  UsdAttribute CreateVVertexCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
246 
247 public:
248  // --------------------------------------------------------------------- //
249  // UORDER
250  // --------------------------------------------------------------------- //
251  /// Order in the U direction. Order must be positive and is
252  /// equal to the degree of the polynomial basis to be evaluated, plus 1.
253  ///
254  /// \n C++ Type: int
255  /// \n Usd Type: SdfValueTypeNames->Int
256  /// \n Variability: SdfVariabilityVarying
257  /// \n Fallback Value: No Fallback
259  UsdAttribute GetUOrderAttr() const;
260 
261  /// See GetUOrderAttr(), and also
262  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
263  /// If specified, author \p defaultValue as the attribute's default,
264  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
265  /// the default for \p writeSparsely is \c false.
267  UsdAttribute CreateUOrderAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
268 
269 public:
270  // --------------------------------------------------------------------- //
271  // VORDER
272  // --------------------------------------------------------------------- //
273  /// Order in the V direction. Order must be positive and is
274  /// equal to the degree of the polynomial basis to be evaluated, plus 1.
275  ///
276  /// \n C++ Type: int
277  /// \n Usd Type: SdfValueTypeNames->Int
278  /// \n Variability: SdfVariabilityVarying
279  /// \n Fallback Value: No Fallback
281  UsdAttribute GetVOrderAttr() const;
282 
283  /// See GetVOrderAttr(), and also
284  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
285  /// If specified, author \p defaultValue as the attribute's default,
286  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
287  /// the default for \p writeSparsely is \c false.
289  UsdAttribute CreateVOrderAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
290 
291 public:
292  // --------------------------------------------------------------------- //
293  // UKNOTS
294  // --------------------------------------------------------------------- //
295  /// Knot vector for U direction providing U parameterization.
296  /// The length of this array must be ( uVertexCount + uOrder ), and its
297  /// entries must take on monotonically increasing values.
298  ///
299  /// \n C++ Type: VtArray<double>
300  /// \n Usd Type: SdfValueTypeNames->DoubleArray
301  /// \n Variability: SdfVariabilityVarying
302  /// \n Fallback Value: No Fallback
304  UsdAttribute GetUKnotsAttr() const;
305 
306  /// See GetUKnotsAttr(), and also
307  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
308  /// If specified, author \p defaultValue as the attribute's default,
309  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
310  /// the default for \p writeSparsely is \c false.
312  UsdAttribute CreateUKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
313 
314 public:
315  // --------------------------------------------------------------------- //
316  // VKNOTS
317  // --------------------------------------------------------------------- //
318  /// Knot vector for V direction providing U parameterization.
319  /// The length of this array must be ( vVertexCount + vOrder ), and its
320  /// entries must take on monotonically increasing values.
321  ///
322  /// \n C++ Type: VtArray<double>
323  /// \n Usd Type: SdfValueTypeNames->DoubleArray
324  /// \n Variability: SdfVariabilityVarying
325  /// \n Fallback Value: No Fallback
327  UsdAttribute GetVKnotsAttr() const;
328 
329  /// See GetVKnotsAttr(), and also
330  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
331  /// If specified, author \p defaultValue as the attribute's default,
332  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
333  /// the default for \p writeSparsely is \c false.
335  UsdAttribute CreateVKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
336 
337 public:
338  // --------------------------------------------------------------------- //
339  // UFORM
340  // --------------------------------------------------------------------- //
341  /// Interpret the control grid and knot vectors as representing
342  /// an open, geometrically closed, or geometrically closed and C2 continuous
343  /// surface along the U dimension.
344  /// \sa \ref UsdGeom_NurbsPatch_Form "NurbsPatch Form"
345  ///
346  /// \n C++ Type: TfToken
347  /// \n Usd Type: SdfValueTypeNames->Token
348  /// \n Variability: SdfVariabilityUniform
349  /// \n Fallback Value: open
350  /// \n \ref UsdGeomTokens "Allowed Values": [open, closed, periodic]
352  UsdAttribute GetUFormAttr() const;
353 
354  /// See GetUFormAttr(), and also
355  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
356  /// If specified, author \p defaultValue as the attribute's default,
357  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
358  /// the default for \p writeSparsely is \c false.
360  UsdAttribute CreateUFormAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
361 
362 public:
363  // --------------------------------------------------------------------- //
364  // VFORM
365  // --------------------------------------------------------------------- //
366  /// Interpret the control grid and knot vectors as representing
367  /// an open, geometrically closed, or geometrically closed and C2 continuous
368  /// surface along the V dimension.
369  /// \sa \ref UsdGeom_NurbsPatch_Form "NurbsPatch Form"
370  ///
371  /// \n C++ Type: TfToken
372  /// \n Usd Type: SdfValueTypeNames->Token
373  /// \n Variability: SdfVariabilityUniform
374  /// \n Fallback Value: open
375  /// \n \ref UsdGeomTokens "Allowed Values": [open, closed, periodic]
377  UsdAttribute GetVFormAttr() const;
378 
379  /// See GetVFormAttr(), and also
380  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
381  /// If specified, author \p defaultValue as the attribute's default,
382  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
383  /// the default for \p writeSparsely is \c false.
385  UsdAttribute CreateVFormAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
386 
387 public:
388  // --------------------------------------------------------------------- //
389  // URANGE
390  // --------------------------------------------------------------------- //
391  /// Provides the minimum and maximum parametric values (as defined
392  /// by uKnots) over which the surface is actually defined. The minimum
393  /// must be less than the maximum, and greater than or equal to the
394  /// value of uKnots[uOrder-1]. The maxium must be less than or equal
395  /// to the last element's value in uKnots.
396  ///
397  /// \n C++ Type: GfVec2d
398  /// \n Usd Type: SdfValueTypeNames->Double2
399  /// \n Variability: SdfVariabilityVarying
400  /// \n Fallback Value: No Fallback
402  UsdAttribute GetURangeAttr() const;
403 
404  /// See GetURangeAttr(), and also
405  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
406  /// If specified, author \p defaultValue as the attribute's default,
407  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
408  /// the default for \p writeSparsely is \c false.
410  UsdAttribute CreateURangeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
411 
412 public:
413  // --------------------------------------------------------------------- //
414  // VRANGE
415  // --------------------------------------------------------------------- //
416  /// Provides the minimum and maximum parametric values (as defined
417  /// by vKnots) over which the surface is actually defined. The minimum
418  /// must be less than the maximum, and greater than or equal to the
419  /// value of vKnots[vOrder-1]. The maxium must be less than or equal
420  /// to the last element's value in vKnots.
421  ///
422  /// \n C++ Type: GfVec2d
423  /// \n Usd Type: SdfValueTypeNames->Double2
424  /// \n Variability: SdfVariabilityVarying
425  /// \n Fallback Value: No Fallback
427  UsdAttribute GetVRangeAttr() const;
428 
429  /// See GetVRangeAttr(), and also
430  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
431  /// If specified, author \p defaultValue as the attribute's default,
432  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
433  /// the default for \p writeSparsely is \c false.
435  UsdAttribute CreateVRangeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
436 
437 public:
438  // --------------------------------------------------------------------- //
439  // POINTWEIGHTS
440  // --------------------------------------------------------------------- //
441  /// Optionally provides "w" components for each control point,
442  /// thus must be the same length as the points attribute. If authored,
443  /// the patch will be rational. If unauthored, the patch will be
444  /// polynomial, i.e. weight for all points is 1.0.
445  /// \note Some DCC's pre-weight the \em points, but in this schema,
446  /// \em points are not pre-weighted.
447  ///
448  /// \n C++ Type: VtArray<double>
449  /// \n Usd Type: SdfValueTypeNames->DoubleArray
450  /// \n Variability: SdfVariabilityVarying
451  /// \n Fallback Value: No Fallback
454 
455  /// See GetPointWeightsAttr(), and also
456  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
457  /// If specified, author \p defaultValue as the attribute's default,
458  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
459  /// the default for \p writeSparsely is \c false.
461  UsdAttribute CreatePointWeightsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
462 
463 public:
464  // --------------------------------------------------------------------- //
465  // TRIMCURVECOUNTS
466  // --------------------------------------------------------------------- //
467  /// Each element specifies how many curves are present in each
468  /// "loop" of the trimCurve, and the length of the array determines how
469  /// many loops the trimCurve contains. The sum of all elements is the
470  /// total nuber of curves in the trim, to which we will refer as
471  /// \em nCurves in describing the other trim attributes.
472  ///
473  /// \n C++ Type: VtArray<int>
474  /// \n Usd Type: SdfValueTypeNames->IntArray
475  /// \n Variability: SdfVariabilityVarying
476  /// \n Fallback Value: No Fallback
479 
480  /// See GetTrimCurveCountsAttr(), and also
481  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
482  /// If specified, author \p defaultValue as the attribute's default,
483  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
484  /// the default for \p writeSparsely is \c false.
486  UsdAttribute CreateTrimCurveCountsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
487 
488 public:
489  // --------------------------------------------------------------------- //
490  // TRIMCURVEORDERS
491  // --------------------------------------------------------------------- //
492  /// Flat list of orders for each of the \em nCurves curves.
493  ///
494  /// \n C++ Type: VtArray<int>
495  /// \n Usd Type: SdfValueTypeNames->IntArray
496  /// \n Variability: SdfVariabilityVarying
497  /// \n Fallback Value: No Fallback
500 
501  /// See GetTrimCurveOrdersAttr(), and also
502  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
503  /// If specified, author \p defaultValue as the attribute's default,
504  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
505  /// the default for \p writeSparsely is \c false.
507  UsdAttribute CreateTrimCurveOrdersAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
508 
509 public:
510  // --------------------------------------------------------------------- //
511  // TRIMCURVEVERTEXCOUNTS
512  // --------------------------------------------------------------------- //
513  /// Flat list of number of vertices for each of the
514  /// \em nCurves curves.
515  ///
516  /// \n C++ Type: VtArray<int>
517  /// \n Usd Type: SdfValueTypeNames->IntArray
518  /// \n Variability: SdfVariabilityVarying
519  /// \n Fallback Value: No Fallback
522 
523  /// See GetTrimCurveVertexCountsAttr(), and also
524  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
525  /// If specified, author \p defaultValue as the attribute's default,
526  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
527  /// the default for \p writeSparsely is \c false.
529  UsdAttribute CreateTrimCurveVertexCountsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
530 
531 public:
532  // --------------------------------------------------------------------- //
533  // TRIMCURVEKNOTS
534  // --------------------------------------------------------------------- //
535  /// Flat list of parametric values for each of the
536  /// \em nCurves curves. There will be as many knots as the sum over
537  /// all elements of \em vertexCounts plus the sum over all elements of
538  /// \em orders.
539  ///
540  /// \n C++ Type: VtArray<double>
541  /// \n Usd Type: SdfValueTypeNames->DoubleArray
542  /// \n Variability: SdfVariabilityVarying
543  /// \n Fallback Value: No Fallback
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  /// \n C++ Type: VtArray<GfVec2d>
563  /// \n Usd Type: SdfValueTypeNames->Double2Array
564  /// \n Variability: SdfVariabilityVarying
565  /// \n Fallback Value: No Fallback
568 
569  /// See GetTrimCurveRangesAttr(), and also
570  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
571  /// If specified, author \p defaultValue as the attribute's default,
572  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
573  /// the default for \p writeSparsely is \c false.
575  UsdAttribute CreateTrimCurveRangesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
576 
577 public:
578  // --------------------------------------------------------------------- //
579  // TRIMCURVEPOINTS
580  // --------------------------------------------------------------------- //
581  /// Flat list of homogeneous 2D points (u, v, w) that comprise
582  /// the \em nCurves curves. The number of points should be equal to the
583  /// um over all elements of \em vertexCounts.
584  ///
585  /// \n C++ Type: VtArray<GfVec3d>
586  /// \n Usd Type: SdfValueTypeNames->Double3Array
587  /// \n Variability: SdfVariabilityVarying
588  /// \n Fallback Value: No Fallback
591 
592  /// See GetTrimCurvePointsAttr(), and also
593  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
594  /// If specified, author \p defaultValue as the attribute's default,
595  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
596  /// the default for \p writeSparsely is \c false.
598  UsdAttribute CreateTrimCurvePointsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
599 
600 public:
601  // ===================================================================== //
602  // Feel free to add custom code below this line, it will be preserved by
603  // the code generator.
604  //
605  // Just remember to:
606  // - Close the class declaration with };
607  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
608  // - Close the include guard with #endif
609  // ===================================================================== //
610  // --(BEGIN CUSTOM CODE)--
611 };
612 
614 
615 #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 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
USDGEOM_API UsdAttribute GetTrimCurveVertexCountsAttr() const
USDGEOM_API UsdAttribute CreateTrimCurvePointsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
Represents a concrete typed schema.
static USDGEOM_API UsdGeomNurbsPatch Define(const UsdStagePtr &stage, const SdfPath &path)
static const UsdSchemaType schemaType
Definition: nurbsPatch.h:115
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)
UsdSchemaType
Definition: common.h:149
Definition: prim.h:131
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:438
USDGEOM_API UsdAttribute GetVVertexCountAttr() const
USDGEOM_API UsdAttribute GetTrimCurvePointsAttr() const
static USDGEOM_API UsdGeomNurbsPatch Get(const UsdStagePtr &stage, const SdfPath &path)
Definition: path.h:287
USDGEOM_API UsdAttribute GetUOrderAttr() const
USDGEOM_API UsdAttribute GetVFormAttr() const
USDGEOM_API UsdAttribute GetTrimCurveKnotsAttr() const
GLsizei const GLchar *const * path
Definition: glew.h:6461
USDGEOM_API UsdAttribute CreateUVertexCountAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1245
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:83
USDGEOM_API UsdAttribute GetPointWeightsAttr() const
Definition: type.h:70
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:182
virtual USDGEOM_API ~UsdGeomNurbsPatch()
Destructor.
USDGEOM_API UsdSchemaType _GetSchemaType() const override