All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
joint.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 USDPHYSICS_GENERATED_JOINT_H
8#define USDPHYSICS_GENERATED_JOINT_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdPhysics/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// PHYSICSJOINT //
34// -------------------------------------------------------------------------- //
35
46{
47public:
51 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
52
57 explicit UsdPhysicsJoint(const UsdPrim& prim=UsdPrim())
58 : UsdGeomImageable(prim)
59 {
60 }
61
65 explicit UsdPhysicsJoint(const UsdSchemaBase& schemaObj)
66 : UsdGeomImageable(schemaObj)
67 {
68 }
69
71 USDPHYSICS_API
73
77 USDPHYSICS_API
78 static const TfTokenVector &
79 GetSchemaAttributeNames(bool includeInherited=true);
80
90 USDPHYSICS_API
91 static UsdPhysicsJoint
92 Get(const UsdStagePtr &stage, const SdfPath &path);
93
116 USDPHYSICS_API
117 static UsdPhysicsJoint
118 Define(const UsdStagePtr &stage, const SdfPath &path);
119
120protected:
124 USDPHYSICS_API
126
127private:
128 // needs to invoke _GetStaticTfType.
129 friend class UsdSchemaRegistry;
130 USDPHYSICS_API
131 static const TfType &_GetStaticTfType();
132
133 static bool _IsTypedSchema();
134
135 // override SchemaBase virtuals.
136 USDPHYSICS_API
137 const TfType &_GetTfType() const override;
138
139public:
140 // --------------------------------------------------------------------- //
141 // LOCALPOS0
142 // --------------------------------------------------------------------- //
150 USDPHYSICS_API
152
158 USDPHYSICS_API
159 UsdAttribute CreateLocalPos0Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
160
161public:
162 // --------------------------------------------------------------------- //
163 // LOCALROT0
164 // --------------------------------------------------------------------- //
172 USDPHYSICS_API
174
180 USDPHYSICS_API
181 UsdAttribute CreateLocalRot0Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
182
183public:
184 // --------------------------------------------------------------------- //
185 // LOCALPOS1
186 // --------------------------------------------------------------------- //
194 USDPHYSICS_API
196
202 USDPHYSICS_API
203 UsdAttribute CreateLocalPos1Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
204
205public:
206 // --------------------------------------------------------------------- //
207 // LOCALROT1
208 // --------------------------------------------------------------------- //
216 USDPHYSICS_API
218
224 USDPHYSICS_API
225 UsdAttribute CreateLocalRot1Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
226
227public:
228 // --------------------------------------------------------------------- //
229 // JOINTENABLED
230 // --------------------------------------------------------------------- //
238 USDPHYSICS_API
240
246 USDPHYSICS_API
247 UsdAttribute CreateJointEnabledAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
248
249public:
250 // --------------------------------------------------------------------- //
251 // COLLISIONENABLED
252 // --------------------------------------------------------------------- //
260 USDPHYSICS_API
262
268 USDPHYSICS_API
269 UsdAttribute CreateCollisionEnabledAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
270
271public:
272 // --------------------------------------------------------------------- //
273 // EXCLUDEFROMARTICULATION
274 // --------------------------------------------------------------------- //
283 USDPHYSICS_API
285
291 USDPHYSICS_API
292 UsdAttribute CreateExcludeFromArticulationAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
293
294public:
295 // --------------------------------------------------------------------- //
296 // BREAKFORCE
297 // --------------------------------------------------------------------- //
307 USDPHYSICS_API
309
315 USDPHYSICS_API
316 UsdAttribute CreateBreakForceAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
317
318public:
319 // --------------------------------------------------------------------- //
320 // BREAKTORQUE
321 // --------------------------------------------------------------------- //
331 USDPHYSICS_API
333
339 USDPHYSICS_API
340 UsdAttribute CreateBreakTorqueAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
341
342public:
343 // --------------------------------------------------------------------- //
344 // BODY0
345 // --------------------------------------------------------------------- //
348 USDPHYSICS_API
350
353 USDPHYSICS_API
355
356public:
357 // --------------------------------------------------------------------- //
358 // BODY1
359 // --------------------------------------------------------------------- //
362 USDPHYSICS_API
364
367 USDPHYSICS_API
369
370public:
371 // ===================================================================== //
372 // Feel free to add custom code below this line, it will be preserved by
373 // the code generator.
374 //
375 // Just remember to:
376 // - Close the class declaration with };
377 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
378 // - Close the include guard with #endif
379 // ===================================================================== //
380 // --(BEGIN CUSTOM CODE)--
381};
382
383PXR_NAMESPACE_CLOSE_SCOPE
384
385#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
Base class for all prims that may require rendering or visualization of some sort.
Definition: imageable.h:58
A joint constrains the movement of rigid bodies.
Definition: joint.h:46
USDPHYSICS_API UsdAttribute GetJointEnabledAttr() const
Determines if the joint is enabled.
USDPHYSICS_API UsdAttribute CreateLocalRot1Attr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLocalRot1Attr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDPHYSICS_API UsdAttribute GetBreakTorqueAttr() const
Joint break torque.
UsdPhysicsJoint(const UsdSchemaBase &schemaObj)
Construct a UsdPhysicsJoint on the prim held by schemaObj .
Definition: joint.h:65
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: joint.h:51
USDPHYSICS_API UsdAttribute GetLocalPos1Attr() const
Relative position of the joint frame to body1's frame.
static USDPHYSICS_API UsdPhysicsJoint Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdPhysicsJoint holding the prim adhering to this schema at path on stage.
USDPHYSICS_API UsdAttribute GetBreakForceAttr() const
Joint break force.
static USDPHYSICS_API UsdPhysicsJoint Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDPHYSICS_API UsdAttribute CreateLocalPos0Attr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLocalPos0Attr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDPHYSICS_API UsdAttribute CreateLocalPos1Attr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLocalPos1Attr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDPHYSICS_API UsdAttribute GetLocalPos0Attr() const
Relative position of the joint frame to body0's frame.
USDPHYSICS_API UsdRelationship CreateBody1Rel() const
See GetBody1Rel(), and also Create vs Get Property Methods for when to use Get vs Create.
USDPHYSICS_API UsdAttribute CreateCollisionEnabledAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetCollisionEnabledAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDPHYSICS_API UsdAttribute CreateBreakTorqueAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetBreakTorqueAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDPHYSICS_API UsdAttribute GetExcludeFromArticulationAttr() const
Determines if the joint can be included in an Articulation.
USDPHYSICS_API UsdAttribute GetLocalRot1Attr() const
Relative orientation of the joint frame to body1's frame.
USDPHYSICS_API UsdRelationship GetBody1Rel() const
Relationship to any UsdGeomXformable.
USDPHYSICS_API UsdAttribute CreateLocalRot0Attr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLocalRot0Attr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDPHYSICS_API UsdRelationship GetBody0Rel() const
Relationship to any UsdGeomXformable.
virtual USDPHYSICS_API ~UsdPhysicsJoint()
Destructor.
USDPHYSICS_API UsdAttribute CreateJointEnabledAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetJointEnabledAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdPhysicsJoint(const UsdPrim &prim=UsdPrim())
Construct a UsdPhysicsJoint on UsdPrim prim .
Definition: joint.h:57
static USDPHYSICS_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...
USDPHYSICS_API UsdAttribute CreateBreakForceAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetBreakForceAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDPHYSICS_API UsdAttribute GetLocalRot0Attr() const
Relative orientation of the joint frame to body0's frame.
USDPHYSICS_API UsdRelationship CreateBody0Rel() const
See GetBody0Rel(), and also Create vs Get Property Methods for when to use Get vs Create.
USDPHYSICS_API UsdAttribute CreateExcludeFromArticulationAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetExcludeFromArticulationAttr(), and also Create vs Get Property Methods for when to use Get vs ...
USDPHYSICS_API UsdAttribute GetCollisionEnabledAttr() const
Determines if the jointed subtrees should collide or not.
USDPHYSICS_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
Definition: relationship.h:111
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: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