All Classes Files Functions Variables Pages
physxRigidBodyAPI.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 PHYSXSCHEMA_GENERATED_PHYSXRIGIDBODYAPI_H
25 #define PHYSXSCHEMA_GENERATED_PHYSXRIGIDBODYAPI_H
26 
28 
29 #include "pxr/pxr.h"
30 #include ".//api.h"
31 #include "pxr/usd/usd/apiSchemaBase.h"
32 #include "pxr/usd/usd/prim.h"
33 #include "pxr/usd/usd/stage.h"
34 #include ".//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 // PHYSXRIGIDBODYAPI //
51 // -------------------------------------------------------------------------- //
52 
57 class PhysxSchemaPhysxRigidBodyAPI : public UsdAPISchemaBase
58 {
59 public:
63  static const UsdSchemaType schemaType = UsdSchemaType::SingleApplyAPI;
64 
69  explicit PhysxSchemaPhysxRigidBodyAPI(const UsdPrim& prim=UsdPrim())
70  : UsdAPISchemaBase(prim)
71  {
72  }
73 
77  explicit PhysxSchemaPhysxRigidBodyAPI(const UsdSchemaBase& schemaObj)
78  : UsdAPISchemaBase(schemaObj)
79  {
80  }
81 
83  PHYSXSCHEMA_API
85 
89  PHYSXSCHEMA_API
90  static const TfTokenVector &
91  GetSchemaAttributeNames(bool includeInherited=true);
92 
102  PHYSXSCHEMA_API
104  Get(const UsdStagePtr &stage, const SdfPath &path);
105 
106 
121  PHYSXSCHEMA_API
123  Apply(const UsdPrim &prim);
124 
125 protected:
129  PHYSXSCHEMA_API
130  UsdSchemaType _GetSchemaType() const override;
131 
132 private:
133  // needs to invoke _GetStaticTfType.
134  friend class UsdSchemaRegistry;
135  PHYSXSCHEMA_API
136  static const TfType &_GetStaticTfType();
137 
138  static bool _IsTypedSchema();
139 
140  // override SchemaBase virtuals.
141  PHYSXSCHEMA_API
142  const TfType &_GetTfType() const override;
143 
144 public:
145  // --------------------------------------------------------------------- //
146  // LINEARDAMPING
147  // --------------------------------------------------------------------- //
157  PHYSXSCHEMA_API
158  UsdAttribute GetLinearDampingAttr() const;
159 
165  PHYSXSCHEMA_API
166  UsdAttribute CreateLinearDampingAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
167 
168 public:
169  // --------------------------------------------------------------------- //
170  // ANGULARDAMPING
171  // --------------------------------------------------------------------- //
181  PHYSXSCHEMA_API
182  UsdAttribute GetAngularDampingAttr() const;
183 
189  PHYSXSCHEMA_API
190  UsdAttribute CreateAngularDampingAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
191 
192 public:
193  // --------------------------------------------------------------------- //
194  // MAXLINEARVELOCITY
195  // --------------------------------------------------------------------- //
205  PHYSXSCHEMA_API
206  UsdAttribute GetMaxLinearVelocityAttr() const;
207 
213  PHYSXSCHEMA_API
214  UsdAttribute CreateMaxLinearVelocityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
215 
216 public:
217  // --------------------------------------------------------------------- //
218  // MAXANGULARVELOCITY
219  // --------------------------------------------------------------------- //
229  PHYSXSCHEMA_API
230  UsdAttribute GetMaxAngularVelocityAttr() const;
231 
237  PHYSXSCHEMA_API
238  UsdAttribute CreateMaxAngularVelocityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
239 
240 public:
241  // --------------------------------------------------------------------- //
242  // SLEEPTHRESHOLD
243  // --------------------------------------------------------------------- //
254  PHYSXSCHEMA_API
255  UsdAttribute GetSleepThresholdAttr() const;
256 
262  PHYSXSCHEMA_API
263  UsdAttribute CreateSleepThresholdAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
264 
265 public:
266  // --------------------------------------------------------------------- //
267  // STABILIZATIONTHRESHOLD
268  // --------------------------------------------------------------------- //
279  PHYSXSCHEMA_API
280  UsdAttribute GetStabilizationThresholdAttr() const;
281 
287  PHYSXSCHEMA_API
288  UsdAttribute CreateStabilizationThresholdAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
289 
290 public:
291  // --------------------------------------------------------------------- //
292  // MAXDEPENETRATIONVELOCITY
293  // --------------------------------------------------------------------- //
304  PHYSXSCHEMA_API
305  UsdAttribute GetMaxDepenetrationVelocityAttr() const;
306 
312  PHYSXSCHEMA_API
313  UsdAttribute CreateMaxDepenetrationVelocityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
314 
315 public:
316  // --------------------------------------------------------------------- //
317  // MAXCONTACTIMPULSE
318  // --------------------------------------------------------------------- //
330  PHYSXSCHEMA_API
331  UsdAttribute GetMaxContactImpulseAttr() const;
332 
338  PHYSXSCHEMA_API
339  UsdAttribute CreateMaxContactImpulseAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
340 
341 public:
342  // --------------------------------------------------------------------- //
343  // SOLVERPOSITIONITERATIONCOUNT
344  // --------------------------------------------------------------------- //
352  PHYSXSCHEMA_API
353  UsdAttribute GetSolverPositionIterationCountAttr() const;
354 
360  PHYSXSCHEMA_API
361  UsdAttribute CreateSolverPositionIterationCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
362 
363 public:
364  // --------------------------------------------------------------------- //
365  // SOLVERVELOCITYITERATIONCOUNT
366  // --------------------------------------------------------------------- //
374  PHYSXSCHEMA_API
375  UsdAttribute GetSolverVelocityIterationCountAttr() const;
376 
382  PHYSXSCHEMA_API
383  UsdAttribute CreateSolverVelocityIterationCountAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
384 
385 public:
386  // --------------------------------------------------------------------- //
387  // ENABLECCD
388  // --------------------------------------------------------------------- //
396  PHYSXSCHEMA_API
397  UsdAttribute GetEnableCCDAttr() const;
398 
404  PHYSXSCHEMA_API
405  UsdAttribute CreateEnableCCDAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
406 
407 public:
408  // --------------------------------------------------------------------- //
409  // ENABLESPECULATIVECCD
410  // --------------------------------------------------------------------- //
418  PHYSXSCHEMA_API
419  UsdAttribute GetEnableSpeculativeCCDAttr() const;
420 
426  PHYSXSCHEMA_API
427  UsdAttribute CreateEnableSpeculativeCCDAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
428 
429 public:
430  // --------------------------------------------------------------------- //
431  // RETAINACCELERATIONS
432  // --------------------------------------------------------------------- //
440  PHYSXSCHEMA_API
441  UsdAttribute GetRetainAccelerationsAttr() const;
442 
448  PHYSXSCHEMA_API
449  UsdAttribute CreateRetainAccelerationsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
450 
451 public:
452  // --------------------------------------------------------------------- //
453  // ENABLEGYROSCOPICFORCES
454  // --------------------------------------------------------------------- //
462  PHYSXSCHEMA_API
463  UsdAttribute GetEnableGyroscopicForcesAttr() const;
464 
470  PHYSXSCHEMA_API
471  UsdAttribute CreateEnableGyroscopicForcesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
472 
473 public:
474  // --------------------------------------------------------------------- //
475  // DISABLEGRAVITY
476  // --------------------------------------------------------------------- //
484  PHYSXSCHEMA_API
485  UsdAttribute GetDisableGravityAttr() const;
486 
492  PHYSXSCHEMA_API
493  UsdAttribute CreateDisableGravityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
494 
495 public:
496  // --------------------------------------------------------------------- //
497  // SOLVECONTACT
498  // --------------------------------------------------------------------- //
506  PHYSXSCHEMA_API
507  UsdAttribute GetSolveContactAttr() const;
508 
514  PHYSXSCHEMA_API
515  UsdAttribute CreateSolveContactAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
516 
517 public:
518  // --------------------------------------------------------------------- //
519  // LOCKEDPOSAXIS
520  // --------------------------------------------------------------------- //
528  PHYSXSCHEMA_API
529  UsdAttribute GetLockedPosAxisAttr() const;
530 
536  PHYSXSCHEMA_API
537  UsdAttribute CreateLockedPosAxisAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
538 
539 public:
540  // --------------------------------------------------------------------- //
541  // LOCKEDROTAXIS
542  // --------------------------------------------------------------------- //
550  PHYSXSCHEMA_API
551  UsdAttribute GetLockedRotAxisAttr() const;
552 
558  PHYSXSCHEMA_API
559  UsdAttribute CreateLockedRotAxisAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
560 
561 public:
562  // --------------------------------------------------------------------- //
563  // CONTACTSLOPCOEFFICIENT
564  // --------------------------------------------------------------------- //
576  PHYSXSCHEMA_API
577  UsdAttribute GetContactSlopCoefficientAttr() const;
578 
584  PHYSXSCHEMA_API
585  UsdAttribute CreateContactSlopCoefficientAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
586 
587 public:
588  // --------------------------------------------------------------------- //
589  // CFMSCALE
590  // --------------------------------------------------------------------- //
602  PHYSXSCHEMA_API
603  UsdAttribute GetCfmScaleAttr() const;
604 
610  PHYSXSCHEMA_API
611  UsdAttribute CreateCfmScaleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
612 
613 public:
614  // ===================================================================== //
615  // Feel free to add custom code below this line, it will be preserved by
616  // the code generator.
617  //
618  // Just remember to:
619  // - Close the class declaration with };
620  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
621  // - Close the include guard with #endif
622  // ===================================================================== //
623  // --(BEGIN CUSTOM CODE)--
624 };
625 
626 PXR_NAMESPACE_CLOSE_SCOPE
627 
628 #endif
PHYSXSCHEMA_API UsdAttribute CreateCfmScaleAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetCfmScaleAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
PHYSXSCHEMA_API UsdAttribute GetSleepThresholdAttr() const
Mass-normalized kinetic energy threshold below which an actor may go to sleep.
PHYSXSCHEMA_API UsdAttribute GetDisableGravityAttr() const
Disable gravity for the actor.
PHYSXSCHEMA_API UsdSchemaType _GetSchemaType() const override
Returns the type of schema this class belongs to.
PHYSXSCHEMA_API UsdAttribute GetSolverPositionIterationCountAttr() const
Solver position iteration counts for the body.
PHYSXSCHEMA_API UsdAttribute GetEnableCCDAttr() const
Enables swept integration for the actor.
PhysxSchemaPhysxRigidBodyAPI(const UsdSchemaBase &schemaObj)
Construct a PhysxSchemaPhysxRigidBodyAPI on the prim held by schemaObj .
PHYSXSCHEMA_API UsdAttribute CreateSolverVelocityIterationCountAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSolverVelocityIterationCountAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs...
PHYSXSCHEMA_API UsdAttribute CreateLockedPosAxisAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLockedPosAxisAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
PHYSXSCHEMA_API UsdAttribute CreateAngularDampingAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetAngularDampingAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
static PHYSXSCHEMA_API PhysxSchemaPhysxRigidBodyAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given prim.
PHYSXSCHEMA_API UsdAttribute CreateLinearDampingAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLinearDampingAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
virtual PHYSXSCHEMA_API ~PhysxSchemaPhysxRigidBodyAPI()
Destructor.
PHYSXSCHEMA_API UsdAttribute CreateSolverPositionIterationCountAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSolverPositionIterationCountAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs...
static PHYSXSCHEMA_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...
PHYSXSCHEMA_API UsdAttribute CreateContactSlopCoefficientAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetContactSlopCoefficientAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Creat...
PHYSXSCHEMA_API UsdAttribute GetCfmScaleAttr() const
The cfm scale term can help stabilize an articulation by weakening the constraint's response...
PHYSXSCHEMA_API UsdAttribute GetSolverVelocityIterationCountAttr() const
Solver velocity iteration counts for the body.
PHYSXSCHEMA_API UsdAttribute CreateEnableSpeculativeCCDAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetEnableSpeculativeCCDAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
PHYSXSCHEMA_API UsdAttribute CreateRetainAccelerationsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetRetainAccelerationsAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
PHYSXSCHEMA_API UsdAttribute GetLockedPosAxisAttr() const
Collection of flags providing a mechanism to lock motion along/around a specific axis (1 << 0...
PhysX rigid body extended parameters.
PHYSXSCHEMA_API UsdAttribute GetStabilizationThresholdAttr() const
Mass-normalized kinetic energy threshold below which an actor may participate in stabilization.
PHYSXSCHEMA_API UsdAttribute CreateEnableGyroscopicForcesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetEnableGyroscopicForcesAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Creat...
PHYSXSCHEMA_API UsdAttribute CreateLockedRotAxisAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLockedRotAxisAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
PHYSXSCHEMA_API UsdAttribute GetMaxLinearVelocityAttr() const
Maximum allowable linear velocity for the rigid body.
PHYSXSCHEMA_API UsdAttribute CreateSleepThresholdAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSleepThresholdAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
PHYSXSCHEMA_API UsdAttribute CreateMaxAngularVelocityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetMaxAngularVelocityAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
PHYSXSCHEMA_API UsdAttribute GetAngularDampingAttr() const
Angular damping coefficient.
PHYSXSCHEMA_API UsdAttribute CreateSolveContactAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetSolveContactAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
PHYSXSCHEMA_API UsdAttribute CreateMaxContactImpulseAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetMaxContactImpulseAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
static PHYSXSCHEMA_API PhysxSchemaPhysxRigidBodyAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a PhysxSchemaPhysxRigidBodyAPI holding the prim adhering to this schema at path on stage...
PhysxSchemaPhysxRigidBodyAPI(const UsdPrim &prim=UsdPrim())
Construct a PhysxSchemaPhysxRigidBodyAPI on UsdPrim prim .
PHYSXSCHEMA_API UsdAttribute GetMaxAngularVelocityAttr() const
Maximum allowable angular velocity for rigid body.
PHYSXSCHEMA_API UsdAttribute GetMaxDepenetrationVelocityAttr() const
The maximum depenetration velocity permitted to be introduced by the solver.
PHYSXSCHEMA_API UsdAttribute CreateMaxLinearVelocityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetMaxLinearVelocityAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
PHYSXSCHEMA_API UsdAttribute GetContactSlopCoefficientAttr() const
Tolerance on the angular influence of a contact that can help improve the behavior of rolling approxi...
PHYSXSCHEMA_API UsdAttribute GetEnableGyroscopicForcesAttr() const
Enables computation of gyroscopic forces on the rigid body.
PHYSXSCHEMA_API UsdAttribute GetMaxContactImpulseAttr() const
Sets a limit on the impulse that may be applied at a contact.
PHYSXSCHEMA_API UsdAttribute CreateStabilizationThresholdAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetStabilizationThresholdAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Creat...
PHYSXSCHEMA_API UsdAttribute GetSolveContactAttr() const
Process the contacts of this rigid body in the dynamics solver.
PHYSXSCHEMA_API UsdAttribute GetLockedRotAxisAttr() const
Collection of flags providing a mechanism to lock motion along/around a specific axis (1 << 0...
PHYSXSCHEMA_API UsdAttribute GetRetainAccelerationsAttr() const
Carries over forces/accelerations between frames, rather than clearing them.
static const UsdSchemaType schemaType
Compile time constant representing what kind of schema this class is.
PHYSXSCHEMA_API UsdAttribute GetLinearDampingAttr() const
Linear damping coefficient.
PHYSXSCHEMA_API UsdAttribute CreateMaxDepenetrationVelocityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetMaxDepenetrationVelocityAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Cre...
PHYSXSCHEMA_API UsdAttribute GetEnableSpeculativeCCDAttr() const
Register a rigid body to dynamically adjust contact offset based on velocity.
PHYSXSCHEMA_API UsdAttribute CreateDisableGravityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetDisableGravityAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...
PHYSXSCHEMA_API UsdAttribute CreateEnableCCDAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetEnableCCDAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create...