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"
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  UsdSchemaKind _GetSchemaKind() 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  // --------------------------------------------------------------------- //
215  USDGEOM_API
217 
223  USDGEOM_API
224  UsdAttribute CreateUVertexCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
225 
226 public:
227  // --------------------------------------------------------------------- //
228  // VVERTEXCOUNT
229  // --------------------------------------------------------------------- //
238  USDGEOM_API
240 
246  USDGEOM_API
247  UsdAttribute CreateVVertexCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
248 
249 public:
250  // --------------------------------------------------------------------- //
251  // UORDER
252  // --------------------------------------------------------------------- //
261  USDGEOM_API
262  UsdAttribute GetUOrderAttr() const;
263 
269  USDGEOM_API
270  UsdAttribute CreateUOrderAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
271 
272 public:
273  // --------------------------------------------------------------------- //
274  // VORDER
275  // --------------------------------------------------------------------- //
284  USDGEOM_API
285  UsdAttribute GetVOrderAttr() const;
286 
292  USDGEOM_API
293  UsdAttribute CreateVOrderAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
294 
295 public:
296  // --------------------------------------------------------------------- //
297  // UKNOTS
298  // --------------------------------------------------------------------- //
308  USDGEOM_API
309  UsdAttribute GetUKnotsAttr() const;
310 
316  USDGEOM_API
317  UsdAttribute CreateUKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
318 
319 public:
320  // --------------------------------------------------------------------- //
321  // VKNOTS
322  // --------------------------------------------------------------------- //
332  USDGEOM_API
333  UsdAttribute GetVKnotsAttr() const;
334 
340  USDGEOM_API
341  UsdAttribute CreateVKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
342 
343 public:
344  // --------------------------------------------------------------------- //
345  // UFORM
346  // --------------------------------------------------------------------- //
359  USDGEOM_API
360  UsdAttribute GetUFormAttr() const;
361 
367  USDGEOM_API
368  UsdAttribute CreateUFormAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
369 
370 public:
371  // --------------------------------------------------------------------- //
372  // VFORM
373  // --------------------------------------------------------------------- //
386  USDGEOM_API
387  UsdAttribute GetVFormAttr() const;
388 
394  USDGEOM_API
395  UsdAttribute CreateVFormAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
396 
397 public:
398  // --------------------------------------------------------------------- //
399  // URANGE
400  // --------------------------------------------------------------------- //
412  USDGEOM_API
413  UsdAttribute GetURangeAttr() const;
414 
420  USDGEOM_API
421  UsdAttribute CreateURangeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
422 
423 public:
424  // --------------------------------------------------------------------- //
425  // VRANGE
426  // --------------------------------------------------------------------- //
438  USDGEOM_API
439  UsdAttribute GetVRangeAttr() const;
440 
446  USDGEOM_API
447  UsdAttribute CreateVRangeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
448 
449 public:
450  // --------------------------------------------------------------------- //
451  // POINTWEIGHTS
452  // --------------------------------------------------------------------- //
465  USDGEOM_API
467 
473  USDGEOM_API
474  UsdAttribute CreatePointWeightsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
475 
476 public:
477  // --------------------------------------------------------------------- //
478  // TRIMCURVECOUNTS
479  // --------------------------------------------------------------------- //
491  USDGEOM_API
493 
499  USDGEOM_API
500  UsdAttribute CreateTrimCurveCountsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
501 
502 public:
503  // --------------------------------------------------------------------- //
504  // TRIMCURVEORDERS
505  // --------------------------------------------------------------------- //
513  USDGEOM_API
515 
521  USDGEOM_API
522  UsdAttribute CreateTrimCurveOrdersAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
523 
524 public:
525  // --------------------------------------------------------------------- //
526  // TRIMCURVEVERTEXCOUNTS
527  // --------------------------------------------------------------------- //
536  USDGEOM_API
538 
544  USDGEOM_API
545  UsdAttribute CreateTrimCurveVertexCountsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
546 
547 public:
548  // --------------------------------------------------------------------- //
549  // TRIMCURVEKNOTS
550  // --------------------------------------------------------------------- //
561  USDGEOM_API
563 
569  USDGEOM_API
570  UsdAttribute CreateTrimCurveKnotsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
571 
572 public:
573  // --------------------------------------------------------------------- //
574  // TRIMCURVERANGES
575  // --------------------------------------------------------------------- //
584  USDGEOM_API
586 
592  USDGEOM_API
593  UsdAttribute CreateTrimCurveRangesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
594 
595 public:
596  // --------------------------------------------------------------------- //
597  // TRIMCURVEPOINTS
598  // --------------------------------------------------------------------- //
608  USDGEOM_API
610 
616  USDGEOM_API
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 
632 PXR_NAMESPACE_CLOSE_SCOPE
633 
634 #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 UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
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
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...
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:127
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 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
Represents a concrete typed schema.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:132
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:288
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: nurbsPatch.h:115
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:47
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...
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:64
Singleton registry that provides access to schema type information and the prim definitions for regis...
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:168
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
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...