PxArticulation Class Reference
[Physics]

a tree structure of bodies connected by joints that is treated as a unit by the dynamics solver More...

#include <PxArticulation.h>

Inheritance diagram for PxArticulation:

Inheritance graph
PxBase
[legend]
Collaboration diagram for PxArticulation:

Collaboration graph
PxBasePxFlags\< PxBaseFlag::Enum, PxU16 \>
[legend]

List of all members.

Public Member Functions

virtual void release ()=0
 Deletes the articulation.
virtual PxScenegetScene () const =0
 Retrieves the scene which this articulation belongs to.
virtual void setMaxProjectionIterations (PxU32 iterations)=0
 sets maxProjectionIterations.
virtual PxU32 getMaxProjectionIterations () const =0
 gets maxProjectionIterations.
virtual void setSeparationTolerance (PxReal tolerance)=0
 sets separationTolerance.
virtual PxReal getSeparationTolerance () const =0
 gets separationTolerance.
virtual void setInternalDriveIterations (PxU32 iterations)=0
 sets the number of iterations used to compute the drive response to internal forces
virtual PxU32 getInternalDriveIterations () const =0
 gets internal driveIterations.
virtual void setExternalDriveIterations (PxU32 iterations)=0
 sets the number of iterations for drive response to external forces.
virtual PxU32 getExternalDriveIterations () const =0
 gets externalDriveIterations.
virtual void setSolverIterationCounts (PxU32 minPositionIters, PxU32 minVelocityIters=1)=0
 Sets the solver iteration counts for the articulation.
virtual void getSolverIterationCounts (PxU32 &minPositionIters, PxU32 &minVelocityIters) const =0
 Retrieves the solver iteration counts.
virtual bool isSleeping () const =0
 Returns true if this articulation is sleeping.
virtual void setSleepThreshold (PxReal threshold)=0
 Sets the mass-normalized energy threshold below which an articulation may go to sleep.
virtual PxReal getSleepThreshold () const =0
 Returns the mass-normalized energy below which an articulation may go to sleep.
virtual void setStabilizationThreshold (PxReal threshold)=0
 Sets the mass-normalized kinetic energy threshold below which an articulation may participate in stabilization.
virtual PxReal getStabilizationThreshold () const =0
 Returns the mass-normalized kinetic energy below which an articulation may participate in stabilization.
virtual void setWakeCounter (PxReal wakeCounterValue)=0
 Sets the wake counter for the articulation.
virtual PxReal getWakeCounter () const =0
 Returns the wake counter of the articulation.
virtual void wakeUp ()=0
 Wakes up the articulation if it is sleeping.
virtual void putToSleep ()=0
 Forces the articulation to sleep.
virtual PxArticulationLinkcreateLink (PxArticulationLink *parent, const PxTransform &pose)=0
 adds a link to the articulation with default attribute values.
virtual PxU32 getNbLinks () const =0
 returns the number of links in the articulation
virtual PxU32 getLinks (PxArticulationLink **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 returns the set of links in the articulation
virtual void setName (const char *name)=0
 Sets a name string for the object that can be retrieved with getName().
virtual const char * getName () const =0
 Retrieves the name string set with setName().
virtual PxBounds3 getWorldBounds (float inflation=1.01f) const =0
 Retrieves the axis aligned bounding box enclosing the articulation.
virtual PxAggregategetAggregate () const =0
 Retrieves the aggregate the articulation might be a part of.
virtual PxArticulationDriveCachecreateDriveCache (PxReal compliance, PxU32 driveIterations) const =0
 create a drive cache for applying impulses which are propagated to the entire articulation
virtual void updateDriveCache (PxArticulationDriveCache &driveCache, PxReal compliance, PxU32 driveIterations) const =0
 update a drive cache
virtual void releaseDriveCache (PxArticulationDriveCache &driveCache) const =0
 release a drive cache
virtual void applyImpulse (PxArticulationLink *link, const PxArticulationDriveCache &driveCache, const PxVec3 &linearImpulse, const PxVec3 &angularImpulse)=0
 apply an impulse to an entire articulation
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
virtual const char * getConcreteTypeName () const
 Returns string name of dynamic type.

Public Attributes

void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object.

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.


Detailed Description

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. An articulation may have at most 64 links.

See also:
PxArticulationJoint PxArticulationLink PxPhysics.createArticulation

Constructor & Destructor Documentation

PX_INLINE PxArticulation::PxArticulation ( PxType  concreteType,
PxBaseFlags  baseFlags 
) [inline, protected]

PX_INLINE PxArticulation::PxArticulation ( PxBaseFlags  baseFlags  )  [inline, protected]

virtual PxArticulation::~PxArticulation (  )  [inline, protected, virtual]


Member Function Documentation

virtual void PxArticulation::applyImpulse ( PxArticulationLink link,
const PxArticulationDriveCache driveCache,
const PxVec3 linearImpulse,
const PxVec3 angularImpulse 
) [pure virtual]

apply an impulse to an entire articulation

Parameters:
[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
See also:
computeImpulseResponse
Note:
this call may only be made on articulations that are in a scene, and may not be made during simulation

virtual void PxArticulation::computeImpulseResponse ( PxArticulationLink link,
PxVec3 linearResponse,
PxVec3 angularResponse,
const PxArticulationDriveCache driveCache,
const PxVec3 linearImpulse,
const PxVec3 angularImpulse 
) const [pure virtual]

determine the effect of applying an impulse to an entire articulation, without applying the impulse

Parameters:
[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
See also:
applyImpulse
This call will wake up the articulation if it is asleep.

Note:
this call may only be made on articulations that are in a scene, and may not be made during simulation

virtual PxArticulationDriveCache* PxArticulation::createDriveCache ( PxReal  compliance,
PxU32  driveIterations 
) const [pure virtual]

create a drive cache for applying impulses which are propagated to the entire articulation

Parameters:
[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
Returns:
a drive cache
See also:
PxArticulationDriveCache updateDriveCache releaseDriveCache applyImpulse computeImpulseResponse
Note:
this call may only be made on articulations that are in a scene, and may not be made during simulation

virtual PxArticulationLink* PxArticulation::createLink ( PxArticulationLink parent,
const PxTransform pose 
) [pure virtual]

adds a link to the articulation with default attribute values.

Parameters:
[in] parent the parent link of the articulation. Should be NULL if (and only if) this is the root link
[in] pose the initial pose of the new link. Must be a valid transform
Returns:
the new link, or NULL if the link cannot be created because the articulation has reached its maximum link count (currently 64).
See also:
PxArticulationLink

virtual PxAggregate* PxArticulation::getAggregate (  )  const [pure virtual]

Retrieves the aggregate the articulation might be a part of.

Returns:
The aggregate the articulation is a part of, or NULL if the articulation does not belong to an aggregate.
See also:
PxAggregate

virtual const char* PxArticulation::getConcreteTypeName (  )  const [inline, virtual]

Returns string name of dynamic type.

Returns:
Class name of most derived type of this object.

Implements PxBase.

virtual PxU32 PxArticulation::getExternalDriveIterations (  )  const [pure virtual]

gets externalDriveIterations.

Returns:
the number of iterations used to compute the drive response to external forces
See also:
setExternalDriveIterations()

virtual PxU32 PxArticulation::getInternalDriveIterations (  )  const [pure virtual]

gets internal driveIterations.

Returns:
the number of iterations used to compute the drive response to internal forces
See also:
setInternalDriveIterations()

virtual PxU32 PxArticulation::getLinks ( PxArticulationLink **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const [pure virtual]

returns the set of links in the articulation

Parameters:
[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.
[in] startIndex Index of first link pointer to be retrieved
Returns:
the number of links written into the buffer.
See also:
ArticulationLink

virtual PxU32 PxArticulation::getMaxProjectionIterations (  )  const [pure virtual]

gets maxProjectionIterations.

Returns:
the maximum number of projection iterations
See also:
setMaxProjectionIterations()

virtual const char* PxArticulation::getName (  )  const [pure virtual]

Retrieves the name string set with setName().

Returns:
Name string associated with object.
See also:
setName()

virtual PxU32 PxArticulation::getNbLinks (  )  const [pure virtual]

returns the number of links in the articulation

virtual PxScene* PxArticulation::getScene (  )  const [pure virtual]

Retrieves the scene which this articulation belongs to.

Returns:
Owner Scene. NULL if not part of a scene.
See also:
PxScene

virtual PxReal PxArticulation::getSeparationTolerance (  )  const [pure virtual]

gets separationTolerance.

Returns:
the separation tolerance
See also:
setSeparationTolerance()

virtual PxReal PxArticulation::getSleepThreshold (  )  const [pure virtual]

Returns the mass-normalized energy below which an articulation may go to sleep.

Returns:
The energy threshold for sleeping.
See also:
isSleeping() wakeUp() putToSleep() setSleepThreshold()

virtual void PxArticulation::getSolverIterationCounts ( PxU32 minPositionIters,
PxU32 minVelocityIters 
) const [pure virtual]

Retrieves the solver iteration counts.

See also:
setSolverIterationCounts()

virtual PxReal PxArticulation::getStabilizationThreshold (  )  const [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.

Returns:
The energy threshold for participating in stabilization.
See also:
setStabilizationThreshold() PxSceneFlag::eENABLE_STABILIZATION

virtual PxReal PxArticulation::getWakeCounter (  )  const [pure virtual]

Returns the wake counter of the articulation.

Returns:
The wake counter of the articulation.
See also:
isSleeping() setWakeCounter()

virtual PxBounds3 PxArticulation::getWorldBounds ( float  inflation = 1.01f  )  const [pure virtual]

Retrieves the axis aligned bounding box enclosing the articulation.

Parameters:
[in] inflation Scale factor for computed world bounds. Box extents are multiplied by this value.
Returns:
The articulation's bounding box.
See also:
PxBounds3

virtual bool PxArticulation::isKindOf ( const char *  superClass  )  const [inline, protected, virtual]

Returns whether a given type name matches with the type of this instance.

Reimplemented from PxBase.

References PxBase::isKindOf().

virtual bool PxArticulation::isSleeping (  )  const [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:

  • The wake counter is positive (see setWakeCounter()).
  • The linear or angular velocity of any link is non-zero.
  • A non-zero force or torque has been applied to the articulation or any of its links.
If an articulation is sleeping, the following state is guaranteed:

  • The wake counter is zero.
  • The linear and angular velocity of all links is zero.
  • There is no force update pending.
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.

Note:
It is invalid to use this method if the articulation has not been added to a scene already.
Returns:
True if the articulation is sleeping.
See also:
isSleeping() wakeUp() putToSleep() getSleepThreshold()

virtual void PxArticulation::putToSleep (  )  [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.

Note:
This will set any applied force, the velocity and the wake counter of all bodies in the articulation to zero.

It is invalid to use this method if the articulation has not been added to a scene already.

See also:
isSleeping() wakeUp()

virtual void PxArticulation::release (  )  [pure virtual]

Deletes the articulation.

Do not keep a reference to the deleted instance.

See also:
PxPhysics.createArticulation()

Implements PxBase.

virtual void PxArticulation::releaseDriveCache ( PxArticulationDriveCache driveCache  )  const [pure virtual]

release a drive cache

Parameters:
[in] driveCache the drive cache to release
See also:
createDriveCache updateDriveCache

virtual void PxArticulation::setExternalDriveIterations ( PxU32  iterations  )  [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.

Parameters:
[in] iterations the number of iterations used to compute the drive response to external forces.
Default: 4

See also:
getExternalDriveIterations()

virtual void PxArticulation::setInternalDriveIterations ( PxU32  iterations  )  [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.

Parameters:
[in] iterations the number of iterations used to compute the drive response to internal forces.
Default: 4

See also:
getInternalDriveIterations()

virtual void PxArticulation::setMaxProjectionIterations ( PxU32  iterations  )  [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.

Parameters:
[in] iterations the maximum number of projection iterations Default: 4
See also:
getMaxProjectionIterations()

virtual void PxArticulation::setName ( const char *  name  )  [pure virtual]

Sets a name string for the object that can be retrieved with getName().

This is for debugging and is not used by the SDK. The string is not copied by the SDK, only the pointer is stored.

Parameters:
[in] name String to set the objects name to.
See also:
getName()

virtual void PxArticulation::setSeparationTolerance ( PxReal  tolerance  )  [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

Parameters:
[in] tolerance the separation tolerance for the articulation
See also:
getSeparationTolerance()

virtual void PxArticulation::setSleepThreshold ( PxReal  threshold  )  [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.

Parameters:
[in] threshold Energy below which an actor may go to sleep. Range: [0, PX_MAX_F32)
See also:
isSleeping() getSleepThreshold() wakeUp() putToSleep()

virtual void PxArticulation::setSolverIterationCounts ( PxU32  minPositionIters,
PxU32  minVelocityIters = 1 
) [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.

Parameters:
[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]
See also:
getSolverIterationCounts()

virtual void PxArticulation::setStabilizationThreshold ( PxReal  threshold  )  [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

Parameters:
[in] threshold Energy below which an actor may participate in stabilization. Range: [0,inf)
See also:
getStabilizationThreshold() PxSceneFlag::eENABLE_STABILIZATION

virtual void PxArticulation::setWakeCounter ( PxReal  wakeCounterValue  )  [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.

Note:
Passing in a positive value will wake the articulation up automatically.
Default: 0.4 (which corresponds to 20 frames for a time step of 0.02)

Parameters:
[in] wakeCounterValue Wake counter value. Range: [0, PX_MAX_F32)
See also:
isSleeping() getWakeCounter()

virtual void PxArticulation::updateDriveCache ( PxArticulationDriveCache driveCache,
PxReal  compliance,
PxU32  driveIterations 
) const [pure virtual]

update a drive cache

Parameters:
[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
See also:
releaseDriveCache createDriveCache applyImpulse computeImpulseResponse
Note:
this call may only be made on articulations that are in a scene, and may not be made during simulation

virtual void PxArticulation::wakeUp (  )  [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.

Note:
This will set the wake counter of the articulation to the value specified in PxSceneDesc::wakeCounterResetValue.

It is invalid to use this method if the articulation has not been added to a scene already.

See also:
isSleeping() putToSleep()


Member Data Documentation

user can assign this to whatever, usually to create a 1:1 relationship with a user object.


The documentation for this class was generated from the following file:


Copyright © 2008-2018 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com