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 
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usdGeom/api.h"
31 #include "pxr/usd/usdGeom/pointBased.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 
45 PXR_NAMESPACE_OPEN_SCOPE
46 
47 class SdfAssetPath;
48 
49 // -------------------------------------------------------------------------- //
50 // NURBSPATCH //
51 // -------------------------------------------------------------------------- //
52 
110 {
111 public:
116 
121  explicit UsdGeomNurbsPatch(const UsdPrim& prim=UsdPrim())
122  : UsdGeomPointBased(prim)
123  {
124  }
125 
129  explicit UsdGeomNurbsPatch(const UsdSchemaBase& schemaObj)
130  : UsdGeomPointBased(schemaObj)
131  {
132  }
133 
135  USDGEOM_API
136  virtual ~UsdGeomNurbsPatch();
137 
141  USDGEOM_API
142  static const TfTokenVector &
143  GetSchemaAttributeNames(bool includeInherited=true);
144 
154  USDGEOM_API
155  static UsdGeomNurbsPatch
156  Get(const UsdStagePtr &stage, const SdfPath &path);
157 
180  USDGEOM_API
181  static UsdGeomNurbsPatch
182  Define(const UsdStagePtr &stage, const SdfPath &path);
183 
184 protected:
188  USDGEOM_API
189  UsdSchemaType _GetSchemaType() const override;
190 
191 private:
192  // needs to invoke _GetStaticTfType.
193  friend class UsdSchemaRegistry;
194  USDGEOM_API
195  static const TfType &_GetStaticTfType();
196 
197  static bool _IsTypedSchema();
198 
199  // override SchemaBase virtuals.
200  USDGEOM_API
201  const TfType &_GetTfType() const override;
202 
203 public:
204  // --------------------------------------------------------------------- //
205  // UVERTEXCOUNT
206  // --------------------------------------------------------------------- //
214  USDGEOM_API
216 
222  USDGEOM_API
223  UsdAttribute CreateUVertexCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
224 
225 public:
226  // --------------------------------------------------------------------- //
227  // VVERTEXCOUNT
228  // --------------------------------------------------------------------- //
236  USDGEOM_API
238 
244  USDGEOM_API
245  UsdAttribute CreateVVertexCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
246 
247 public:
248  // --------------------------------------------------------------------- //
249  // UORDER
250  // --------------------------------------------------------------------- //
258  USDGEOM_API
259  UsdAttribute GetUOrderAttr() const;
260 
266  USDGEOM_API
267  UsdAttribute CreateUOrderAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
268 
269 public:
270  // --------------------------------------------------------------------- //
271  // VORDER
272  // --------------------------------------------------------------------- //
280  USDGEOM_API
281  UsdAttribute GetVOrderAttr() const;
282 
288  USDGEOM_API
289  UsdAttribute CreateVOrderAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
290 
291 public:
292  // --------------------------------------------------------------------- //
293  // UKNOTS
294  // --------------------------------------------------------------------- //
303  USDGEOM_API
304  UsdAttribute GetUKnotsAttr() const;
305 
311  USDGEOM_API
312  UsdAttribute CreateUKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
313 
314 public:
315  // --------------------------------------------------------------------- //
316  // VKNOTS
317  // --------------------------------------------------------------------- //
326  USDGEOM_API
327  UsdAttribute GetVKnotsAttr() const;
328 
334  USDGEOM_API
335  UsdAttribute CreateVKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
336 
337 public:
338  // --------------------------------------------------------------------- //
339  // UFORM
340  // --------------------------------------------------------------------- //
351  USDGEOM_API
352  UsdAttribute GetUFormAttr() const;
353 
359  USDGEOM_API
360  UsdAttribute CreateUFormAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
361 
362 public:
363  // --------------------------------------------------------------------- //
364  // VFORM
365  // --------------------------------------------------------------------- //
376  USDGEOM_API
377  UsdAttribute GetVFormAttr() const;
378 
384  USDGEOM_API
385  UsdAttribute CreateVFormAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
386 
387 public:
388  // --------------------------------------------------------------------- //
389  // URANGE
390  // --------------------------------------------------------------------- //
401  USDGEOM_API
402  UsdAttribute GetURangeAttr() const;
403 
409  USDGEOM_API
410  UsdAttribute CreateURangeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
411 
412 public:
413  // --------------------------------------------------------------------- //
414  // VRANGE
415  // --------------------------------------------------------------------- //
426  USDGEOM_API
427  UsdAttribute GetVRangeAttr() const;
428 
434  USDGEOM_API
435  UsdAttribute CreateVRangeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
436 
437 public:
438  // --------------------------------------------------------------------- //
439  // POINTWEIGHTS
440  // --------------------------------------------------------------------- //
452  USDGEOM_API
454 
460  USDGEOM_API
461  UsdAttribute CreatePointWeightsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
462 
463 public:
464  // --------------------------------------------------------------------- //
465  // TRIMCURVECOUNTS
466  // --------------------------------------------------------------------- //
477  USDGEOM_API
479 
485  USDGEOM_API
486  UsdAttribute CreateTrimCurveCountsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
487 
488 public:
489  // --------------------------------------------------------------------- //
490  // TRIMCURVEORDERS
491  // --------------------------------------------------------------------- //
498  USDGEOM_API
500 
506  USDGEOM_API
507  UsdAttribute CreateTrimCurveOrdersAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
508 
509 public:
510  // --------------------------------------------------------------------- //
511  // TRIMCURVEVERTEXCOUNTS
512  // --------------------------------------------------------------------- //
520  USDGEOM_API
522 
528  USDGEOM_API
529  UsdAttribute CreateTrimCurveVertexCountsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
530 
531 public:
532  // --------------------------------------------------------------------- //
533  // TRIMCURVEKNOTS
534  // --------------------------------------------------------------------- //
544  USDGEOM_API
546 
552  USDGEOM_API
553  UsdAttribute CreateTrimCurveKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
554 
555 public:
556  // --------------------------------------------------------------------- //
557  // TRIMCURVERANGES
558  // --------------------------------------------------------------------- //
566  USDGEOM_API
568 
574  USDGEOM_API
575  UsdAttribute CreateTrimCurveRangesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
576 
577 public:
578  // --------------------------------------------------------------------- //
579  // TRIMCURVEPOINTS
580  // --------------------------------------------------------------------- //
589  USDGEOM_API
591 
597  USDGEOM_API
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 
613 PXR_NAMESPACE_CLOSE_SCOPE
614 
615 #endif
static USDGEOM_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
USDGEOM_API UsdAttribute GetUVertexCountAttr() const
Number of vertices in the U direction.
USDGEOM_API UsdAttribute GetVVertexCountAttr() const
Number of vertices in the V direction.
USDGEOM_API UsdAttribute GetTrimCurveKnotsAttr() const
Flat list of parametric values for each of the nCurves curves.
USDGEOM_API UsdAttribute CreateVKnotsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVKnotsAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API UsdAttribute CreateUVertexCountAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetUVertexCountAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
Base class for all UsdGeomGprims that possess points, providing common attributes such as normals and...
Definition: pointBased.h:58
UsdGeomNurbsPatch(const UsdSchemaBase &schemaObj)
Construct a UsdGeomNurbsPatch on the prim held by schemaObj .
Definition: nurbsPatch.h:129
USDGEOM_API UsdAttribute GetUFormAttr() const
Interpret the control grid and knot vectors as representing an open, geometrically closed...
USDGEOM_API UsdAttribute CreateTrimCurveCountsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetTrimCurveCountsAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API UsdAttribute CreateUOrderAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetUOrderAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API UsdAttribute GetVRangeAttr() const
Provides the minimum and maximum parametric values (as defined by vKnots) over which the surface is a...
USDGEOM_API UsdAttribute GetVFormAttr() const
Interpret the control grid and knot vectors as representing an open, geometrically closed...
USDGEOM_API UsdAttribute CreateTrimCurveOrdersAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetTrimCurveOrdersAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
Scenegraph object for authoring and retrieving numeric, string, and array valued data, sampled over time.
Definition: attribute.h:176
Represents a concrete typed schema.
USDGEOM_API UsdAttribute CreatePointWeightsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetPointWeightsAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API UsdAttribute CreateUFormAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetUFormAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API UsdAttribute CreateVOrderAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVOrderAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API UsdAttribute CreateURangeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetURangeAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API UsdAttribute GetUKnotsAttr() const
Knot vector for U direction providing U parameterization.
static USDGEOM_API UsdGeomNurbsPatch Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomNurbsPatch holding the prim adhering to this schema at path on stage.
static USDGEOM_API UsdGeomNurbsPatch Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDGEOM_API UsdAttribute GetTrimCurveRangesAttr() const
Flat list of minimum and maximum parametric values (as defined by knots) for each of the nCurves curv...
USDGEOM_API UsdSchemaType _GetSchemaType() const override
Returns the type of schema this class belongs to.
USDGEOM_API UsdAttribute GetVKnotsAttr() const
Knot vector for V direction providing U parameterization.
USDGEOM_API UsdAttribute CreateVVertexCountAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVVertexCountAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
Encodes a rational or polynomial non-uniform B-spline surface, with optional trim curves...
Definition: nurbsPatch.h:109
UsdSchemaType
An enum representing which type of schema a given schema class belongs to.
Definition: common.h:149
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:131
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:438
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:287
USDGEOM_API UsdAttribute GetURangeAttr() const
Provides the minimum and maximum parametric values (as defined by uKnots) over which the surface is a...
USDGEOM_API UsdAttribute CreateTrimCurveRangesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetTrimCurveRangesAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API UsdAttribute GetTrimCurveCountsAttr() const
Each element specifies how many curves are present in each &quot;loop&quot; of the trimCurve, and the length of the array determines how many loops the trimCurve contains.
Contains an asset path and an optional resolved path.
Definition: assetPath.h:43
USDGEOM_API UsdAttribute GetTrimCurvePointsAttr() const
Flat list of homogeneous 2D points (u, v, w) that comprise the nCurves curves.
USDGEOM_API UsdAttribute CreateTrimCurvePointsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetTrimCurvePointsAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API UsdAttribute CreateVRangeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVRangeAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
static const UsdSchemaType schemaType
Compile time constant representing what kind of schema this class is.
Definition: nurbsPatch.h:115
USDGEOM_API UsdAttribute CreateTrimCurveVertexCountsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetTrimCurveVertexCountsAttr(), and also Create vs Get Property Methods for when to use Get vs Cr...
TfType represents a dynamic runtime type.
Definition: type.h:70
Singleton registry that provides access to prim and property definition information for registered Us...
USDGEOM_API UsdAttribute GetVOrderAttr() const
Order in the V direction.
USDGEOM_API UsdAttribute CreateVFormAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVFormAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
The base class for all schema types in Usd.
Definition: schemaBase.h:56
USDGEOM_API UsdAttribute GetPointWeightsAttr() const
Optionally provides &quot;w&quot; components for each control point, thus must be the same length as the points...
USDGEOM_API UsdAttribute GetTrimCurveOrdersAttr() const
Flat list of orders for each of the nCurves curves.
virtual USDGEOM_API ~UsdGeomNurbsPatch()
Destructor.
USDGEOM_API UsdAttribute GetUOrderAttr() const
Order in the U direction.
USDGEOM_API UsdAttribute GetTrimCurveVertexCountsAttr() const
Flat list of number of vertices for each of the nCurves curves.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:182
USDGEOM_API UsdAttribute CreateUKnotsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetUKnotsAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
USDGEOM_API UsdAttribute CreateTrimCurveKnotsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetTrimCurveKnotsAttr(), and also Create vs Get Property Methods for when to use Get vs Create...
UsdGeomNurbsPatch(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomNurbsPatch on UsdPrim prim .
Definition: nurbsPatch.h:121