All Classes Files Functions Variables Pages
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 "usdPhysics/api.h"
31 #include "pxr/usd/usdGeom/imageable.h"
32 #include "pxr/usd/usd/prim.h"
33 #include "pxr/usd/usd/stage.h"
34 #include "usdPhysics/tokens.h"
35 
36 #include "pxr/base/vt/value.h"
37 
38 #include "pxr/base/gf/vec3d.h"
39 #include "pxr/base/gf/vec3f.h"
40 #include "pxr/base/gf/matrix4d.h"
41 
42 #include "pxr/base/tf/token.h"
43 #include "pxr/base/tf/type.h"
44 
45 PXR_NAMESPACE_OPEN_SCOPE
46 
47 class SdfAssetPath;
48 
49 // -------------------------------------------------------------------------- //
50 // PHYSICSJOINT //
51 // -------------------------------------------------------------------------- //
52 
62 class UsdPhysicsJoint : public UsdGeomImageable
63 {
64 public:
68  static const UsdSchemaType schemaType = UsdSchemaType::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
89  virtual ~UsdPhysicsJoint();
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 
137 protected:
141  USDPHYSICS_API
142  UsdSchemaType _GetSchemaType() const override;
143 
144 private:
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 
156 public:
157  // --------------------------------------------------------------------- //
158  // LOCALPOS0
159  // --------------------------------------------------------------------- //
167  USDPHYSICS_API
168  UsdAttribute GetLocalPos0Attr() const;
169 
175  USDPHYSICS_API
176  UsdAttribute CreateLocalPos0Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
177 
178 public:
179  // --------------------------------------------------------------------- //
180  // LOCALROT0
181  // --------------------------------------------------------------------- //
189  USDPHYSICS_API
190  UsdAttribute GetLocalRot0Attr() const;
191 
197  USDPHYSICS_API
198  UsdAttribute CreateLocalRot0Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
199 
200 public:
201  // --------------------------------------------------------------------- //
202  // LOCALPOS1
203  // --------------------------------------------------------------------- //
211  USDPHYSICS_API
212  UsdAttribute GetLocalPos1Attr() const;
213 
219  USDPHYSICS_API
220  UsdAttribute CreateLocalPos1Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
221 
222 public:
223  // --------------------------------------------------------------------- //
224  // LOCALROT1
225  // --------------------------------------------------------------------- //
233  USDPHYSICS_API
234  UsdAttribute GetLocalRot1Attr() const;
235 
241  USDPHYSICS_API
242  UsdAttribute CreateLocalRot1Attr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
243 
244 public:
245  // --------------------------------------------------------------------- //
246  // JOINTENABLED
247  // --------------------------------------------------------------------- //
255  USDPHYSICS_API
256  UsdAttribute GetJointEnabledAttr() const;
257 
263  USDPHYSICS_API
264  UsdAttribute CreateJointEnabledAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
265 
266 public:
267  // --------------------------------------------------------------------- //
268  // COLLISIONENABLED
269  // --------------------------------------------------------------------- //
277  USDPHYSICS_API
278  UsdAttribute GetCollisionEnabledAttr() const;
279 
285  USDPHYSICS_API
286  UsdAttribute CreateCollisionEnabledAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
287 
288 public:
289  // --------------------------------------------------------------------- //
290  // EXCLUDEFROMARTICULATION
291  // --------------------------------------------------------------------- //
300  USDPHYSICS_API
301  UsdAttribute GetExcludeFromArticulationAttr() const;
302 
308  USDPHYSICS_API
309  UsdAttribute CreateExcludeFromArticulationAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
310 
311 public:
312  // --------------------------------------------------------------------- //
313  // BREAKFORCE
314  // --------------------------------------------------------------------- //
324  USDPHYSICS_API
325  UsdAttribute GetBreakForceAttr() const;
326 
332  USDPHYSICS_API
333  UsdAttribute CreateBreakForceAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
334 
335 public:
336  // --------------------------------------------------------------------- //
337  // BREAKTORQUE
338  // --------------------------------------------------------------------- //
348  USDPHYSICS_API
349  UsdAttribute GetBreakTorqueAttr() const;
350 
356  USDPHYSICS_API
357  UsdAttribute CreateBreakTorqueAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
358 
359 public:
360  // --------------------------------------------------------------------- //
361  // BODY0
362  // --------------------------------------------------------------------- //
365  USDPHYSICS_API
366  UsdRelationship GetBody0Rel() const;
367 
370  USDPHYSICS_API
371  UsdRelationship CreateBody0Rel() const;
372 
373 public:
374  // --------------------------------------------------------------------- //
375  // BODY1
376  // --------------------------------------------------------------------- //
379  USDPHYSICS_API
380  UsdRelationship GetBody1Rel() const;
381 
384  USDPHYSICS_API
385  UsdRelationship CreateBody1Rel() const;
386 
387 public:
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 
400 PXR_NAMESPACE_CLOSE_SCOPE
401 
402 #endif
USDPHYSICS_API UsdAttribute GetLocalRot1Attr() const
Relative orientation of the joint frame to body1's frame.
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...
A joint constrains the movement of rigid bodies.
Definition: joint.h:62
USDPHYSICS_API UsdAttribute CreateLocalRot1Attr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLocalRot1Attr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
UsdPhysicsJoint(const UsdPrim &prim=UsdPrim())
Construct a UsdPhysicsJoint on UsdPrim prim .
Definition: joint.h:74
USDPHYSICS_API UsdAttribute CreateLocalPos1Attr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLocalPos1Attr(), and also Usd_Create_Or_Get_Property 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 GetBody0Rel() const
Relationship to any UsdGeomXformable.
USDPHYSICS_API UsdAttribute GetExcludeFromArticulationAttr() const
Determines if the joint can be included in an Articulation.
USDPHYSICS_API UsdAttribute CreateJointEnabledAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetJointEnabledAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
USDPHYSICS_API UsdSchemaType _GetSchemaType() const override
Returns the type of schema this class belongs to.
USDPHYSICS_API UsdAttribute GetLocalPos1Attr() const
Relative position of the joint frame to body1's frame.
USDPHYSICS_API UsdAttribute CreateBreakForceAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetBreakForceAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
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 UsdRelationship CreateBody0Rel() const
See GetBody0Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.
USDPHYSICS_API UsdAttribute CreateBreakTorqueAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetBreakTorqueAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
USDPHYSICS_API UsdAttribute GetLocalRot0Attr() const
Relative orientation of the joint frame to body0's frame.
USDPHYSICS_API UsdAttribute CreateLocalPos0Attr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLocalPos0Attr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
USDPHYSICS_API UsdAttribute CreateCollisionEnabledAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetCollisionEnabledAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
USDPHYSICS_API UsdRelationship GetBody1Rel() const
Relationship to any UsdGeomXformable.
USDPHYSICS_API UsdAttribute GetCollisionEnabledAttr() const
Determines if the jointed subtrees should collide or not.
USDPHYSICS_API UsdAttribute CreateLocalRot0Attr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLocalRot0Attr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
static const UsdSchemaType schemaType
Compile time constant representing what kind of schema this class is.
Definition: joint.h:68
USDPHYSICS_API UsdRelationship CreateBody1Rel() const
See GetBody1Rel(), and also Usd_Create_Or_Get_Property for when to use Get vs Create.
USDPHYSICS_API UsdAttribute GetBreakTorqueAttr() const
Joint break torque.
USDPHYSICS_API UsdAttribute GetJointEnabledAttr() const
Determines if the joint is enabled.
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 CreateExcludeFromArticulationAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetExcludeFromArticulationAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Crea...
virtual USDPHYSICS_API ~UsdPhysicsJoint()
Destructor.
USDPHYSICS_API UsdAttribute GetBreakForceAttr() const
Joint break force.
UsdPhysicsJoint(const UsdSchemaBase &schemaObj)
Construct a UsdPhysicsJoint on the prim held by schemaObj .
Definition: joint.h:82