a tree structure of bodies connected by joints that is treated as a unit by the dynamics solver More...
#include <PxArticulation.h>
Public Member Functions | |
virtual void | release ()=0 |
Deletes the articulation. More... | |
virtual PxScene * | getScene () const =0 |
Retrieves the scene which this articulation belongs to. More... | |
virtual void | setMaxProjectionIterations (PxU32 iterations)=0 |
sets maxProjectionIterations. More... | |
virtual PxU32 | getMaxProjectionIterations () const =0 |
gets maxProjectionIterations. More... | |
virtual void | setSeparationTolerance (PxReal tolerance)=0 |
sets separationTolerance. More... | |
virtual PxReal | getSeparationTolerance () const =0 |
gets separationTolerance. More... | |
virtual void | setInternalDriveIterations (PxU32 iterations)=0 |
sets the number of iterations used to compute the drive response to internal forces More... | |
virtual PxU32 | getInternalDriveIterations () const =0 |
gets internal driveIterations. More... | |
virtual void | setExternalDriveIterations (PxU32 iterations)=0 |
sets the number of iterations for drive response to external forces. More... | |
virtual PxU32 | getExternalDriveIterations () const =0 |
gets externalDriveIterations. More... | |
virtual void | setSolverIterationCounts (PxU32 minPositionIters, PxU32 minVelocityIters=1)=0 |
Sets the solver iteration counts for the articulation. More... | |
virtual void | getSolverIterationCounts (PxU32 &minPositionIters, PxU32 &minVelocityIters) const =0 |
Retrieves the solver iteration counts. More... | |
virtual bool | isSleeping () const =0 |
Returns true if this articulation is sleeping. More... | |
virtual void | setSleepThreshold (PxReal threshold)=0 |
Sets the mass-normalized energy threshold below which an articulation may go to sleep. More... | |
virtual PxReal | getSleepThreshold () const =0 |
Returns the mass-normalized energy below which an articulation may go to sleep. More... | |
virtual void | setStabilizationThreshold (PxReal threshold)=0 |
Sets the mass-normalized kinetic energy threshold below which an articulation may participate in stabilization. More... | |
virtual PxReal | getStabilizationThreshold () const =0 |
Returns the mass-normalized kinetic energy below which an articulation may participate in stabilization. More... | |
virtual void | setWakeCounter (PxReal wakeCounterValue)=0 |
Sets the wake counter for the articulation. More... | |
virtual PxReal | getWakeCounter () const =0 |
Returns the wake counter of the articulation. More... | |
virtual void | wakeUp ()=0 |
Wakes up the articulation if it is sleeping. More... | |
virtual void | putToSleep ()=0 |
Forces the articulation to sleep. More... | |
virtual PxArticulationLink * | createLink (PxArticulationLink *parent, const PxTransform &pose)=0 |
adds a link to the articulation with default attribute values. More... | |
virtual PxU32 | getNbLinks () const =0 |
returns the number of links in the articulation More... | |
virtual PxU32 | getLinks (PxArticulationLink **userBuffer, PxU32 bufferSize) const =0 |
returns the set of links in the articulation More... | |
virtual void | setName (const char *name)=0 |
Sets a name string for the object that can be retrieved with getName(). More... | |
virtual const char * | getName () const =0 |
Retrieves the name string set with setName(). More... | |
virtual PxBounds3 | getWorldBounds (float inflation=1.01f) const =0 |
Retrieves the axis aligned bounding box enclosing the articulation. More... | |
virtual PxAggregate * | getAggregate () const =0 |
Retrieves the aggregate the articulation might be a part of. More... | |
virtual PxArticulationDriveCache * | createDriveCache (PxReal compliance, PxU32 driveIterations) const =0 |
create a drive cache for applying impulses which are propagated to the entire articulation More... | |
virtual void | updateDriveCache (PxArticulationDriveCache &driveCache, PxReal compliance, PxU32 driveIterations) const =0 |
update a drive cache More... | |
virtual void | releaseDriveCache (PxArticulationDriveCache &driveCache) const =0 |
release a drive cache More... | |
virtual void | applyImpulse (PxArticulationLink *link, const PxArticulationDriveCache &driveCache, const PxVec3 &linearImpulse, const PxVec3 &angularImpulse)=0 |
apply an impulse to an entire articulation More... | |
virtual void | computeImpulseResponse (PxArticulationLink *link, PxVec3 &linearResponse, PxVec3 &angularResponse, const PxArticulationDriveCache &driveCache, const PxVec3 &linearImpulse, const PxVec3 &angularImpulse) const =0 |
determine the effect of applying an impulse to an entire articulation, without applying the impulse More... | |
virtual const char * | getConcreteTypeName () const |
Returns string name of dynamic type. More... | |
Public Member Functions inherited from PxBase | |
template<class T > | |
T * | is () |
template<class T > | |
const T * | is () const |
PX_INLINE PxType | getConcreteType () const |
Returns concrete type of object. More... | |
PX_INLINE void | setBaseFlag (PxBaseFlag::Enum flag, bool value) |
Set PxBaseFlag. More... | |
PX_INLINE void | setBaseFlags (PxBaseFlags inFlags) |
Set PxBaseFlags. More... | |
PX_INLINE PxBaseFlags | getBaseFlags () const |
Returns PxBaseFlags. More... | |
virtual bool | isReleasable () const |
Whether the object is subordinate. More... | |
Public Attributes | |
void * | userData |
user can assign this to whatever, usually to create a 1:1 relationship with a user object. More... | |
Protected Member Functions | |
PX_INLINE | PxArticulation (PxType concreteType, PxBaseFlags baseFlags) |
PX_INLINE | PxArticulation (PxBaseFlags baseFlags) |
virtual | ~PxArticulation () |
virtual bool | isKindOf (const char *name) const |
Returns whether a given type name matches with the type of this instance. More... | |
Protected Member Functions inherited from PxBase | |
PX_INLINE | PxBase (PxType concreteType, PxBaseFlags baseFlags) |
Constructor setting concrete type and base flags. More... | |
PX_INLINE | PxBase (PxBaseFlags baseFlags) |
Deserialization constructor setting base flags. More... | |
virtual | ~PxBase () |
Destructor. More... | |
template<class T > | |
bool | typeMatch () const |
Additional Inherited Members | |
Protected Attributes inherited from PxBase | |
PxType | mConcreteType |
PxBaseFlags | mBaseFlags |
a tree structure of bodies connected by joints that is treated as a unit by the dynamics solver
Articulations are more expensive to simulate than the equivalent collection of PxRigidDynamic and PxJoint structures, but because the dynamics solver treats each articulation as a single object, they are much less prone to separation and have better support for actuation.
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedvirtual |
|
pure virtual |
apply an impulse to an entire articulation
[in] | link | the link to which to apply the impulse |
[in] | driveCache | the drive cache |
[in] | linearImpulse | the linear impulse to apply |
[in] | angularImpulse | the angular impulse to apply |
|
pure virtual |
determine the effect of applying an impulse to an entire articulation, without applying the impulse
[in] | link | the link to which to apply the impulse |
[out] | linearResponse | the change in linear velocity of the articulation link |
[out] | angularResponse | the change in angular velocity of the articulation link |
[in] | driveCache | the drive cache |
[in] | linearImpulse | the linear impulse to apply |
[in] | angularImpulse | the angular impulse to apply |
This call will wake up the articulation if it is asleep.
|
pure virtual |
create a drive cache for applying impulses which are propagated to the entire articulation
[in] | compliance | the compliance value to use at all joints of the articulation. This is equivalent to the external compliance parameter for articulation joints, as the impulse is treated as an external force |
[in] | driveIterations | the number of iterations to use to evaluate the drive strengths |
|
pure virtual |
adds a link to the articulation with default attribute values.
[in] | parent | the parent link of the articulation. Should be NULL if (and only if) this is the root link |
[in] | pose | the pose of the new link |
|
pure virtual |
Retrieves the aggregate the articulation might be a part of.
|
inlinevirtual |
Returns string name of dynamic type.
Reimplemented from PxBase.
|
pure virtual |
gets externalDriveIterations.
|
pure virtual |
gets internal driveIterations.
|
pure virtual |
returns the set of links in the articulation
[in] | userBuffer | buffer into which to write an array of articulation link pointers |
[in] | bufferSize | the size of the buffer. If this is not large enough to contain all the pointers to links, only as many as will fit are written. |
|
pure virtual |
gets maxProjectionIterations.
|
pure virtual |
|
pure virtual |
returns the number of links in the articulation
|
pure virtual |
Retrieves the scene which this articulation belongs to.
|
pure virtual |
|
pure virtual |
Returns the mass-normalized energy below which an articulation may go to sleep.
|
pure virtual |
Retrieves the solver iteration counts.
|
pure virtual |
Returns the mass-normalized kinetic energy below which an articulation may participate in stabilization.
Articulations whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
|
pure virtual |
Returns the wake counter of the articulation.
|
pure virtual |
Retrieves the axis aligned bounding box enclosing the articulation.
[in] | inflation | Scale factor for computed world bounds. Box extents are multiplied by this value. |
|
inlineprotectedvirtual |
Returns whether a given type name matches with the type of this instance.
Reimplemented from PxBase.
References PxBase::isKindOf().
|
pure virtual |
Returns true if this articulation is sleeping.
When an actor does not move for a period of time, it is no longer simulated in order to save time. This state is called sleeping. However, because the object automatically wakes up when it is either touched by an awake object, or a sleep-affecting property is changed by the user, the entire sleep mechanism should be transparent to the user.
An articulation can only go to sleep if all links are ready for sleeping. An articulation is guaranteed to be awake if at least one of the following holds:
If an articulation is sleeping, the following state is guaranteed:
When an articulation gets inserted into a scene, it will be considered asleep if all the points above hold, else it will be treated as awake.
If an articulation is asleep after the call to PxScene::fetchResults() returns, it is guaranteed that the poses of the links were not changed. You can use this information to avoid updating the transforms of associated of dependent objects.
|
pure virtual |
Forces the articulation to sleep.
The articulation will stay asleep during the next simulation step if not touched by another non-sleeping actor.
|
pure virtual |
Deletes the articulation.
Do not keep a reference to the deleted instance.
Implements PxBase.
|
pure virtual |
release a drive cache
[in] | driveCache | the drive cache to release |
|
pure virtual |
sets the number of iterations for drive response to external forces.
The drive model uses an iterative algorithm to determine the load on each joint of the articulation. This is the number of iterations to use when computing response of the drive to external forces.
[in] | iterations | the number of iterations used to compute the drive response to external forces. |
Default: 4
|
pure virtual |
sets the number of iterations used to compute the drive response to internal forces
The drive model uses an iterative algorithm to determine the load on each joint of the articulation. This is the number of iterations to use when computing response of the drive to internal forces.
[in] | iterations | the number of iterations used to compute the drive response to internal forces. |
Default: 4
|
pure virtual |
sets maxProjectionIterations.
This is the maximum number of iterations to run projection on the articulation to bring the links back together if the separation tolerance is exceeded.
[in] | iterations | the maximum number of projection iterations Default: 4 |
|
pure virtual |
|
pure virtual |
sets separationTolerance.
This is the maximum allowed separation of any joint in the articulation before projection is used
Default: 0.1f, scaled by the tolerance scale
[in] | tolerance | the separation tolerance for the articulation |
|
pure virtual |
Sets the mass-normalized energy threshold below which an articulation may go to sleep.
The articulation will sleep if the energy of each body is below this threshold.
[in] | threshold | Energy below which an actor may go to sleep. Range: [0, PX_MAX_F32) |
|
pure virtual |
Sets the solver iteration counts for the articulation.
The solver iteration count determines how accurately joints and contacts are resolved. If you are having trouble with jointed bodies oscillating and behaving erratically, then setting a higher position iteration count may improve their stability.
If intersecting bodies are being depenetrated too violently, increase the number of velocity iterations. More velocity iterations will drive the relative exit velocity of the intersecting objects closer to the correct value given the restitution.
[in] | minPositionIters | Number of position iterations the solver should perform for this articulation. Range: [1,255] |
[in] | minVelocityIters | Number of velocity iterations the solver should perform for this articulation. Range: [1,255] |
|
pure virtual |
Sets the mass-normalized kinetic energy threshold below which an articulation may participate in stabilization.
Articulation whose kinetic energy divided by their mass is above this threshold will not participate in stabilization.
This value has no effect if PxSceneFlag::eENABLE_STABILIZATION was not enabled on the PxSceneDesc.
Default: 0.01 * PxTolerancesScale::speed * PxTolerancesScale::speed
[in] | threshold | Energy below which an actor may participate in stabilization. Range: (0,inf] |
|
pure virtual |
Sets the wake counter for the articulation.
The wake counter value determines the minimum amount of time until the articulation can be put to sleep. Please note that an articulation will not be put to sleep if the energy is above the specified threshold (see setSleepThreshold()) or if other awake objects are touching it.
Default: 0.4 (which corresponds to 20 frames for a time step of 0.02)
[in] | wakeCounterValue | Wake counter value. Range: [0, PX_MAX_F32) |
|
pure virtual |
update a drive cache
[in] | driveCache | the drive cache to update |
[in] | compliance | the compliance value to use at all joints of the articulation. |
[in] | driveIterations | the number of iterations to use to evaluate the drive strengths |
|
pure virtual |
Wakes up the articulation if it is sleeping.
The articulation will get woken up and might cause other touching objects to wake up as well during the next simulation step.
void* PxArticulation::userData |
user can assign this to whatever, usually to create a 1:1 relationship with a user object.