All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
skeleton.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 USDSKEL_GENERATED_SKELETON_H
8#define USDSKEL_GENERATED_SKELETON_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdSkel/api.h"
15#include "pxr/usd/usd/prim.h"
16#include "pxr/usd/usd/stage.h"
18
20
21#include "pxr/base/vt/value.h"
22
23#include "pxr/base/gf/vec3d.h"
24#include "pxr/base/gf/vec3f.h"
26
27#include "pxr/base/tf/token.h"
28#include "pxr/base/tf/type.h"
29
30PXR_NAMESPACE_OPEN_SCOPE
31
32class SdfAssetPath;
33
34// -------------------------------------------------------------------------- //
35// SKELETON //
36// -------------------------------------------------------------------------- //
37
47{
48public:
52 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
53
58 explicit UsdSkelSkeleton(const UsdPrim& prim=UsdPrim())
59 : UsdGeomBoundable(prim)
60 {
61 }
62
66 explicit UsdSkelSkeleton(const UsdSchemaBase& schemaObj)
67 : UsdGeomBoundable(schemaObj)
68 {
69 }
70
72 USDSKEL_API
74
78 USDSKEL_API
79 static const TfTokenVector &
80 GetSchemaAttributeNames(bool includeInherited=true);
81
91 USDSKEL_API
92 static UsdSkelSkeleton
93 Get(const UsdStagePtr &stage, const SdfPath &path);
94
117 USDSKEL_API
118 static UsdSkelSkeleton
119 Define(const UsdStagePtr &stage, const SdfPath &path);
120
121protected:
125 USDSKEL_API
127
128private:
129 // needs to invoke _GetStaticTfType.
130 friend class UsdSchemaRegistry;
131 USDSKEL_API
132 static const TfType &_GetStaticTfType();
133
134 static bool _IsTypedSchema();
135
136 // override SchemaBase virtuals.
137 USDSKEL_API
138 const TfType &_GetTfType() const override;
139
140public:
141 // --------------------------------------------------------------------- //
142 // JOINTS
143 // --------------------------------------------------------------------- //
157 USDSKEL_API
159
165 USDSKEL_API
166 UsdAttribute CreateJointsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
167
168public:
169 // --------------------------------------------------------------------- //
170 // JOINTNAMES
171 // --------------------------------------------------------------------- //
182 USDSKEL_API
184
190 USDSKEL_API
191 UsdAttribute CreateJointNamesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
192
193public:
194 // --------------------------------------------------------------------- //
195 // BINDTRANSFORMS
196 // --------------------------------------------------------------------- //
206 USDSKEL_API
208
214 USDSKEL_API
215 UsdAttribute CreateBindTransformsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
216
217public:
218 // --------------------------------------------------------------------- //
219 // RESTTRANSFORMS
220 // --------------------------------------------------------------------- //
233 USDSKEL_API
235
241 USDSKEL_API
242 UsdAttribute CreateRestTransformsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
243
244public:
245 // ===================================================================== //
246 // Feel free to add custom code below this line, it will be preserved by
247 // the code generator.
248 //
249 // Just remember to:
250 // - Close the class declaration with };
251 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
252 // - Close the include guard with #endif
253 // ===================================================================== //
254 // --(BEGIN CUSTOM CODE)--
255};
256
257PXR_NAMESPACE_CLOSE_SCOPE
258
259#endif
Contains an asset path and an optional resolved path.
Definition: assetPath.h:30
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
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:160
Boundable introduces the ability for a prim to persistently cache a rectilinear, local-space,...
Definition: boundable.h:66
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...
Describes a skeleton.
Definition: skeleton.h:47
USDSKEL_API UsdAttribute GetBindTransformsAttr() const
Specifies the bind-pose transforms of each joint in world space, in the ordering imposed by joints.
USDSKEL_API UsdAttribute CreateBindTransformsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetBindTransformsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDSKEL_API UsdSkelSkeleton Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
static USDSKEL_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...
static USDSKEL_API UsdSkelSkeleton Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdSkelSkeleton holding the prim adhering to this schema at path on stage.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: skeleton.h:52
USDSKEL_API UsdAttribute CreateRestTransformsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetRestTransformsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDSKEL_API UsdAttribute CreateJointNamesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetJointNamesAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDSKEL_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
UsdSkelSkeleton(const UsdSchemaBase &schemaObj)
Construct a UsdSkelSkeleton on the prim held by schemaObj .
Definition: skeleton.h:66
USDSKEL_API UsdAttribute CreateJointsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetJointsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
virtual USDSKEL_API ~UsdSkelSkeleton()
Destructor.
USDSKEL_API UsdAttribute GetJointsAttr() const
An array of path tokens identifying the set of joints that make up the skeleton, and their order.
UsdSkelSkeleton(const UsdPrim &prim=UsdPrim())
Construct a UsdSkelSkeleton on UsdPrim prim .
Definition: skeleton.h:58
USDSKEL_API UsdAttribute GetJointNamesAttr() const
If authored, provides a unique name per joint.
USDSKEL_API UsdAttribute GetRestTransformsAttr() const
Specifies the rest-pose transforms of each joint in local space, in the ordering imposed by joints.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
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