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>


Public Member Functions | |
virtual void | release ()=0 |
Deletes the articulation. | |
virtual PxScene * | getScene () 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 | wakeUp (PxReal wakeCounterValue=PX_SLEEP_INTERVAL)=0 |
Wakes up the articulation if it is sleeping. | |
virtual void | putToSleep ()=0 |
Forces the articulation to sleep. | |
virtual PxArticulationLink * | createLink (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) 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 () const =0 |
Retrieves the axis aligned bounding box enclosing the articulation. | |
virtual PxAggregate * | getAggregate () const =0 |
Retrieves the aggregate the articulation might be a part of. | |
virtual PxArticulationDriveCache * | createDriveCache (PxReal compliance, PxU32 driveIterations) const =0 |
create a drive cache for applying impulses which are propagated to the entire articulation | |
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 | |
PxArticulation (PxRefResolver &v) | |
PX_INLINE | PxArticulation () |
virtual | ~PxArticulation () |
virtual bool | isKindOf (const char *name) const |
Detailed Description
a tree structure of bodies connected by joints that is treated as a unit by the dynamics solverArticulations 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.
- See also:
- PxArticulationJoint PxArticulationLink
Constructor & Destructor Documentation
PxArticulation::PxArticulation | ( | PxRefResolver & | v | ) | [inline, protected] |
PX_INLINE PxArticulation::PxArticulation | ( | ) | [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
- 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
- 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 pose of the new link
- Returns:
- the new link, or NULL if the link cannot be created because the articulation has reached its maximum link count
- See also:
- PxsArticulationLink
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.
Reimplemented from PxSerializable.
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 | |||
) | 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.
- Returns:
- the number of links written into the buffer.
- See also:
- PxsArticulationLink
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] |
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] |
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.
virtual PxBounds3 PxArticulation::getWorldBounds | ( | ) | const [pure virtual] |
Retrieves the axis aligned bounding box enclosing the articulation.
- Returns:
- The articulation's bounding box.
- See also:
- PxBounds3
virtual bool PxArticulation::isKindOf | ( | const char * | name | ) | const [inline, protected, virtual] |
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 one of its properties is changed by the user, the entire sleep mechanism should be transparent to the user.
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.
- Returns:
- True if the articulation is sleeping.
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 the velocity of all bodies in the articulation to zero.
- See also:
- isSleeping() wakeUp()
virtual void PxArticulation::release | ( | ) | [pure virtual] |
Deletes the articulation.
Do not keep a reference to the deleted instance.
- See also:
- PxScene::createArticulation()
virtual void PxArticulation::releaseDriveCache | ( | PxArticulationDriveCache & | driveCache | ) | const [pure virtual] |
release a drive cache
- Parameters:
-
[in] driveCache the drive cache to release
- See also:
- createDriveCache
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.
- 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.
- 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] |
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,inf]
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.
- 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::wakeUp | ( | PxReal | wakeCounterValue = PX_SLEEP_INTERVAL |
) | [pure virtual] |
Wakes up the articulation if it is sleeping.
The wakeCounterValue determines how long until the articulation is put to sleep, a value of zero means that the articulation is sleeping. wakeUp(0) is equivalent to PxRigidDynamic::putToSleep().
- Parameters:
-
[in] wakeCounterValue New sleep counter value. Range: [0,inf]
- See also:
- isSleeping() putToSleep()
Member Data Documentation
void* PxArticulation::userData |
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-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com