gprim.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_GPRIM_H
8 #define USDGEOM_GENERATED_GPRIM_H
9 
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 
28 PXR_NAMESPACE_OPEN_SCOPE
29 
30 class SdfAssetPath;
31 
32 // -------------------------------------------------------------------------- //
33 // GPRIM //
34 // -------------------------------------------------------------------------- //
35 
50 {
51 public:
56 
61  explicit UsdGeomGprim(const UsdPrim& prim=UsdPrim())
62  : UsdGeomBoundable(prim)
63  {
64  }
65 
69  explicit UsdGeomGprim(const UsdSchemaBase& schemaObj)
70  : UsdGeomBoundable(schemaObj)
71  {
72  }
73 
75  USDGEOM_API
76  virtual ~UsdGeomGprim();
77 
81  USDGEOM_API
82  static const TfTokenVector &
83  GetSchemaAttributeNames(bool includeInherited=true);
84 
94  USDGEOM_API
95  static UsdGeomGprim
96  Get(const UsdStagePtr &stage, const SdfPath &path);
97 
98 
99 protected:
103  USDGEOM_API
104  UsdSchemaKind _GetSchemaKind() const override;
105 
106 private:
107  // needs to invoke _GetStaticTfType.
108  friend class UsdSchemaRegistry;
109  USDGEOM_API
110  static const TfType &_GetStaticTfType();
111 
112  static bool _IsTypedSchema();
113 
114  // override SchemaBase virtuals.
115  USDGEOM_API
116  const TfType &_GetTfType() const override;
117 
118 public:
119  // --------------------------------------------------------------------- //
120  // DISPLAYCOLOR
121  // --------------------------------------------------------------------- //
133  USDGEOM_API
135 
141  USDGEOM_API
142  UsdAttribute CreateDisplayColorAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
143 
144 public:
145  // --------------------------------------------------------------------- //
146  // DISPLAYOPACITY
147  // --------------------------------------------------------------------- //
158  USDGEOM_API
160 
166  USDGEOM_API
167  UsdAttribute CreateDisplayOpacityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
168 
169 public:
170  // --------------------------------------------------------------------- //
171  // DOUBLESIDED
172  // --------------------------------------------------------------------- //
197  USDGEOM_API
199 
205  USDGEOM_API
206  UsdAttribute CreateDoubleSidedAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
207 
208 public:
209  // --------------------------------------------------------------------- //
210  // ORIENTATION
211  // --------------------------------------------------------------------- //
225  USDGEOM_API
227 
233  USDGEOM_API
234  UsdAttribute CreateOrientationAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
235 
236 public:
237  // ===================================================================== //
238  // Feel free to add custom code below this line, it will be preserved by
239  // the code generator.
240  //
241  // Just remember to:
242  // - Close the class declaration with };
243  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
244  // - Close the include guard with #endif
245  // ===================================================================== //
246  // --(BEGIN CUSTOM CODE)--
247 
251  USDGEOM_API
253 
258  USDGEOM_API
260  const TfToken& interpolation = TfToken(),
261  int elementSize = -1) const;
262 
266  USDGEOM_API
268 
273  USDGEOM_API
275  const TfToken& interpolation = TfToken(),
276  int elementSize = -1) const;
277 
278 };
279 
280 PXR_NAMESPACE_CLOSE_SCOPE
281 
282 #endif
USDGEOM_API UsdGeomPrimvar GetDisplayColorPrimvar() const
Convenience function to get the displayColor Attribute as a Primvar.
USDGEOM_API UsdAttribute GetDisplayColorAttr() const
It is useful to have an "official" colorSet that can be used as a display or modeling color,...
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: gprim.h:55
USDGEOM_API UsdAttribute CreateDisplayColorAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDisplayColorAttr(), 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,...
Definition: attribute.h:183
USDGEOM_API UsdAttribute GetOrientationAttr() const
Orientation specifies whether the gprim's surface normal should be computed using the right hand rule...
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:112
virtual USDGEOM_API ~UsdGeomGprim()
Destructor.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:80
USDGEOM_API UsdAttribute GetDisplayOpacityAttr() const
Companion to displayColor that specifies opacity, broken out as an independent attribute rather than ...
USDGEOM_API UsdAttribute CreateDisplayOpacityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDisplayOpacityAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdGeomGprim(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomGprim on UsdPrim prim .
Definition: gprim.h:61
Boundable introduces the ability for a prim to persistently cache a rectilinear, local-space,...
Definition: boundable.h:65
USDGEOM_API UsdAttribute CreateDoubleSidedAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDoubleSidedAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:489
static USDGEOM_API UsdGeomGprim Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomGprim holding the prim adhering to this schema at path on stage.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:280
USDGEOM_API UsdGeomPrimvar CreateDisplayOpacityPrimvar(const TfToken &interpolation=TfToken(), int elementSize=-1) const
Convenience function to create the displayOpacity primvar, optionally specifying interpolation and el...
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...
Contains an asset path and optional evaluated and resolved paths.
Definition: assetPath.h:78
USDGEOM_API UsdGeomPrimvar CreateDisplayColorPrimvar(const TfToken &interpolation=TfToken(), int elementSize=-1) const
Convenience function to create the displayColor primvar, optionally specifying interpolation and elem...
Base class for all geometric primitives.
Definition: gprim.h:49
UsdGeomGprim(const UsdSchemaBase &schemaObj)
Construct a UsdGeomGprim on the prim held by schemaObj .
Definition: gprim.h:69
USDGEOM_API UsdGeomPrimvar GetDisplayOpacityPrimvar() const
Convenience function to get the displayOpacity Attribute as a Primvar.
Represents a non-concrete typed schema.
TfType represents a dynamic runtime type.
Definition: type.h:47
Singleton registry that provides access to schema type information and the prim definitions for regis...
USDGEOM_API UsdAttribute GetDoubleSidedAttr() const
Although some renderers treat all parametric or polygonal surfaces as if they were effectively lamina...
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
Schema wrapper for UsdAttribute for authoring and introspecting attributes that are primvars.
Definition: primvar.h:247
The base class for all schema types in Usd.
Definition: schemaBase.h:39
USDGEOM_API UsdAttribute CreateOrientationAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetOrientationAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:89
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...