Loading...
Searching...
No Matches
joint.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 USDPHYSICS_GENERATED_JOINT_H
25#define USDPHYSICS_GENERATED_JOINT_H
26
28
29#include "pxr/pxr.h"
30#include "pxr/usd/usdPhysics/api.h"
32#include "pxr/usd/usd/prim.h"
33#include "pxr/usd/usd/stage.h"
35
36#include "pxr/base/vt/value.h"
37
38#include "pxr/base/gf/vec3d.h"
39#include "pxr/base/gf/vec3f.h"
41
42#include "pxr/base/tf/token.h"
43#include "pxr/base/tf/type.h"
44
45PXR_NAMESPACE_OPEN_SCOPE
46
47class SdfAssetPath;
48
49// -------------------------------------------------------------------------- //
50// PHYSICSJOINT //
51// -------------------------------------------------------------------------- //
52
63{
64public:
68 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
69
74 explicit UsdPhysicsJoint(const UsdPrim& prim=UsdPrim())
75 : UsdGeomImageable(prim)
76 {
77 }
78
82 explicit UsdPhysicsJoint(const UsdSchemaBase& schemaObj)
83 : UsdGeomImageable(schemaObj)
84 {
85 }
86
88 USDPHYSICS_API
90
94 USDPHYSICS_API
95 static const TfTokenVector &
96 GetSchemaAttributeNames(bool includeInherited=true);
97
107 USDPHYSICS_API
108 static UsdPhysicsJoint
109 Get(const UsdStagePtr &stage, const SdfPath &path);
110
133 USDPHYSICS_API
134 static UsdPhysicsJoint
135 Define(const UsdStagePtr &stage, const SdfPath &path);
136
137protected:
141 USDPHYSICS_API
143
144private:
145 // needs to invoke _GetStaticTfType.
146 friend class UsdSchemaRegistry;
147 USDPHYSICS_API
148 static const TfType &_GetStaticTfType();
149
150 static bool _IsTypedSchema();
151
152 // override SchemaBase virtuals.
153 USDPHYSICS_API
154 const TfType &_GetTfType() const override;
155
156public:
157 // --------------------------------------------------------------------- //
158 // LOCALPOS0
159 // --------------------------------------------------------------------- //
167 USDPHYSICS_API
169
175 USDPHYSICS_API
176 UsdAttribute CreateLocalPos0Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
177
178public:
179 // --------------------------------------------------------------------- //
180 // LOCALROT0
181 // --------------------------------------------------------------------- //
189 USDPHYSICS_API
191
197 USDPHYSICS_API
198 UsdAttribute CreateLocalRot0Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
199
200public:
201 // --------------------------------------------------------------------- //
202 // LOCALPOS1
203 // --------------------------------------------------------------------- //
211 USDPHYSICS_API
213
219 USDPHYSICS_API
220 UsdAttribute CreateLocalPos1Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
221
222public:
223 // --------------------------------------------------------------------- //
224 // LOCALROT1
225 // --------------------------------------------------------------------- //
233 USDPHYSICS_API
235
241 USDPHYSICS_API
242 UsdAttribute CreateLocalRot1Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
243
244public:
245 // --------------------------------------------------------------------- //
246 // JOINTENABLED
247 // --------------------------------------------------------------------- //
255 USDPHYSICS_API
257
263 USDPHYSICS_API
264 UsdAttribute CreateJointEnabledAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
265
266public:
267 // --------------------------------------------------------------------- //
268 // COLLISIONENABLED
269 // --------------------------------------------------------------------- //
277 USDPHYSICS_API
279
285 USDPHYSICS_API
286 UsdAttribute CreateCollisionEnabledAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
287
288public:
289 // --------------------------------------------------------------------- //
290 // EXCLUDEFROMARTICULATION
291 // --------------------------------------------------------------------- //
300 USDPHYSICS_API
302
308 USDPHYSICS_API
309 UsdAttribute CreateExcludeFromArticulationAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
310
311public:
312 // --------------------------------------------------------------------- //
313 // BREAKFORCE
314 // --------------------------------------------------------------------- //
324 USDPHYSICS_API
326
332 USDPHYSICS_API
333 UsdAttribute CreateBreakForceAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
334
335public:
336 // --------------------------------------------------------------------- //
337 // BREAKTORQUE
338 // --------------------------------------------------------------------- //
348 USDPHYSICS_API
350
356 USDPHYSICS_API
357 UsdAttribute CreateBreakTorqueAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
358
359public:
360 // --------------------------------------------------------------------- //
361 // BODY0
362 // --------------------------------------------------------------------- //
365 USDPHYSICS_API
367
370 USDPHYSICS_API
372
373public:
374 // --------------------------------------------------------------------- //
375 // BODY1
376 // --------------------------------------------------------------------- //
379 USDPHYSICS_API
381
384 USDPHYSICS_API
386
387public:
388 // ===================================================================== //
389 // Feel free to add custom code below this line, it will be preserved by
390 // the code generator.
391 //
392 // Just remember to:
393 // - Close the class declaration with };
394 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
395 // - Close the include guard with #endif
396 // ===================================================================== //
397 // --(BEGIN CUSTOM CODE)--
398};
399
400PXR_NAMESPACE_CLOSE_SCOPE
401
402#endif
Contains an asset path and an optional resolved path.
Definition: assetPath.h:47
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:291
TfType represents a dynamic runtime type.
Definition: type.h:65
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:176
Base class for all prims that may require rendering or visualization of some sort.
Definition: imageable.h:75
A joint constrains the movement of rigid bodies.
Definition: joint.h:63
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:82
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: joint.h:68
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:74
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:134
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
Definition: relationship.h:128
The base class for all schema types in Usd.
Definition: schemaBase.h:56
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:165
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:129
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:457