Loading...
Searching...
No Matches
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"
18
19#include "pxr/base/vt/value.h"
20
21#include "pxr/base/gf/vec3d.h"
22#include "pxr/base/gf/vec3f.h"
24
25#include "pxr/base/tf/token.h"
26#include "pxr/base/tf/type.h"
27
28PXR_NAMESPACE_OPEN_SCOPE
29
30class SdfAssetPath;
31
32// -------------------------------------------------------------------------- //
33// GPRIM //
34// -------------------------------------------------------------------------- //
35
50{
51public:
55 static const UsdSchemaKind schemaKind = UsdSchemaKind::AbstractTyped;
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
99protected:
103 USDGEOM_API
105
106private:
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
118public:
119 // --------------------------------------------------------------------- //
120 // DISPLAYCOLOR
121 // --------------------------------------------------------------------- //
133 USDGEOM_API
135
141 USDGEOM_API
142 UsdAttribute CreateDisplayColorAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
143
144public:
145 // --------------------------------------------------------------------- //
146 // DISPLAYOPACITY
147 // --------------------------------------------------------------------- //
158 USDGEOM_API
160
166 USDGEOM_API
167 UsdAttribute CreateDisplayOpacityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
168
169public:
170 // --------------------------------------------------------------------- //
171 // DOUBLESIDED
172 // --------------------------------------------------------------------- //
197 USDGEOM_API
199
205 USDGEOM_API
206 UsdAttribute CreateDoubleSidedAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
207
208public:
209 // --------------------------------------------------------------------- //
210 // ORIENTATION
211 // --------------------------------------------------------------------- //
225 USDGEOM_API
227
233 USDGEOM_API
234 UsdAttribute CreateOrientationAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
235
236public:
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
280PXR_NAMESPACE_CLOSE_SCOPE
281
282#endif
Contains an asset path and optional evaluated and resolved paths.
Definition: assetPath.h:78
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
TfType represents a dynamic runtime type.
Definition: type.h:48
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:183
Boundable introduces the ability for a prim to persistently cache a rectilinear, local-space,...
Definition: boundable.h:66
Base class for all geometric primitives.
Definition: gprim.h:50
USDGEOM_API UsdGeomPrimvar CreateDisplayColorPrimvar(const TfToken &interpolation=TfToken(), int elementSize=-1) const
Convenience function to create the displayColor primvar, optionally specifying interpolation and elem...
virtual USDGEOM_API ~UsdGeomGprim()
Destructor.
USDGEOM_API UsdAttribute GetDisplayColorAttr() const
It is useful to have an "official" colorSet that can be used as a display or modeling color,...
UsdGeomGprim(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomGprim on UsdPrim prim .
Definition: gprim.h:61
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.
UsdGeomGprim(const UsdSchemaBase &schemaObj)
Construct a UsdGeomGprim on the prim held by schemaObj .
Definition: gprim.h:69
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: gprim.h:55
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.
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.
USDGEOM_API UsdGeomPrimvar GetDisplayOpacityPrimvar() const
Convenience function to get the displayOpacity Attribute as a Primvar.
USDGEOM_API UsdAttribute GetDoubleSidedAttr() const
Although some renderers treat all parametric or polygonal surfaces as if they were effectively lamina...
USDGEOM_API UsdAttribute GetOrientationAttr() const
Orientation specifies whether the gprim's surface normal should be computed using the right hand rule...
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
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 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.
USDGEOM_API UsdGeomPrimvar GetDisplayColorPrimvar() const
Convenience function to get the displayColor Attribute as a Primvar.
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.
USDGEOM_API UsdAttribute GetDisplayOpacityAttr() const
Companion to displayColor that specifies opacity, broken out as an independent attribute rather than ...
USDGEOM_API UsdGeomPrimvar CreateDisplayOpacityPrimvar(const TfToken &interpolation=TfToken(), int elementSize=-1) const
Convenience function to create the displayOpacity primvar, optionally specifying interpolation and el...
Schema wrapper for UsdAttribute for authoring and introspecting attributes that are primvars.
Definition: primvar.h:248
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
The base class for all schema types in Usd.
Definition: schemaBase.h:39
Singleton registry that provides access to schema type information and the prim definitions for regis...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:90
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:112
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440