PxArticulationBase Class Referenceabstract

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

#include <PxArticulationBase.h>

Inheritance diagram for PxArticulationBase:
Collaboration diagram for PxArticulationBase:

Public Types

enum  Enum { eReducedCoordinate = 0, eMaximumCoordinate = 1 }
 

Public Member Functions

virtual PxScenegetScene () const =0
 Retrieves the scene which this articulation belongs to. 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 PxArticulationLinkcreateLink (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, PxU32 startIndex=0) 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 PxAggregategetAggregate () const =0
 Retrieves the aggregate the articulation might be a part of. More...
 
virtual PxArticulationImpl * getImpl ()=0
 
virtual const PxArticulationImpl * getImpl () const =0
 
virtual PxArticulationBase::Enum getType () const =0
 
virtual ~PxArticulationBase ()
 
virtual PxArticulationJointBasecreateArticulationJoint (PxArticulationLink &parent, const PxTransform &parentFrame, PxArticulationLink &child, const PxTransform &childFrame)=0
 
virtual void releaseArticulationJoint (PxArticulationJointBase *joint)=0
 
- Public Member Functions inherited from PxBase
virtual void release ()=0
 Releases the PxBase instance, please check documentation of release in derived class. More...
 
virtual const char * getConcreteTypeName () const =0
 Returns string name of dynamic type. More...
 
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_FORCE_INLINE PxType getConcreteType () const
 Returns concrete type of object. More...
 
PX_FORCE_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag. More...
 
PX_FORCE_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags. More...
 
PX_FORCE_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 PxArticulationBase (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxArticulationBase (PxBaseFlags baseFlags)
 
- 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...
 
virtual bool isKindOf (const char *superClass) const
 Returns whether a given type name matches with the type of this instance. More...
 
template<class T >
bool typeMatch () const
 

Additional Inherited Members

- Protected Attributes inherited from PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 

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

Member Enumeration Documentation

◆ Enum

Enumerator
eReducedCoordinate 
eMaximumCoordinate 

Constructor & Destructor Documentation

◆ ~PxArticulationBase()

virtual PxArticulationBase::~PxArticulationBase ( )
inlinevirtual

◆ PxArticulationBase() [1/2]

PX_INLINE PxArticulationBase::PxArticulationBase ( PxType  concreteType,
PxBaseFlags  baseFlags 
)
inlineprotected

◆ PxArticulationBase() [2/2]

PX_INLINE PxArticulationBase::PxArticulationBase ( PxBaseFlags  baseFlags)
inlineprotected

Member Function Documentation

◆ createArticulationJoint()

virtual PxArticulationJointBase* PxArticulationBase::createArticulationJoint ( PxArticulationLink parent,
const PxTransform parentFrame,
PxArticulationLink child,
const PxTransform childFrame 
)
pure virtual

◆ createLink()

virtual PxArticulationLink* PxArticulationBase::createLink ( PxArticulationLink parent,
const PxTransform pose 
)
pure virtual

adds a link to the articulation with default attribute values.

Parameters
[in]parentthe parent link of the articulation. Should be NULL if (and only if) this is the root link
[in]posethe 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

◆ getAggregate()

virtual PxAggregate* PxArticulationBase::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

◆ getImpl() [1/2]

virtual PxArticulationImpl* PxArticulationBase::getImpl ( )
pure virtual

◆ getImpl() [2/2]

virtual const PxArticulationImpl* PxArticulationBase::getImpl ( ) const
pure virtual

◆ getLinks()

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

returns the set of links in the articulation

Parameters
[in]userBufferbuffer into which to write an array of articulation link pointers
[in]bufferSizethe 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]startIndexIndex of first link pointer to be retrieved
Returns
the number of links written into the buffer.
See also
ArticulationLink

◆ getName()

virtual const char* PxArticulationBase::getName ( ) const
pure virtual

Retrieves the name string set with setName().

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

◆ getNbLinks()

virtual PxU32 PxArticulationBase::getNbLinks ( ) const
pure virtual

returns the number of links in the articulation

◆ getScene()

virtual PxScene* PxArticulationBase::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

◆ getSleepThreshold()

virtual PxReal PxArticulationBase::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()

◆ getSolverIterationCounts()

virtual void PxArticulationBase::getSolverIterationCounts ( PxU32 minPositionIters,
PxU32 minVelocityIters 
) const
pure virtual

Retrieves the solver iteration counts.

See also
setSolverIterationCounts()

◆ getStabilizationThreshold()

virtual PxReal PxArticulationBase::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

◆ getType()

virtual PxArticulationBase::Enum PxArticulationBase::getType ( ) const
pure virtual

◆ getWakeCounter()

virtual PxReal PxArticulationBase::getWakeCounter ( ) const
pure virtual

Returns the wake counter of the articulation.

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

◆ getWorldBounds()

virtual PxBounds3 PxArticulationBase::getWorldBounds ( float  inflation = 1.01f) const
pure virtual

Retrieves the axis aligned bounding box enclosing the articulation.

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

◆ isSleeping()

virtual bool PxArticulationBase::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()

◆ putToSleep()

virtual void PxArticulationBase::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()

◆ releaseArticulationJoint()

virtual void PxArticulationBase::releaseArticulationJoint ( PxArticulationJointBase joint)
pure virtual

◆ setName()

virtual void PxArticulationBase::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]nameString to set the objects name to.
See also
getName()

◆ setSleepThreshold()

virtual void PxArticulationBase::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]thresholdEnergy below which an actor may go to sleep. Range: [0, PX_MAX_F32)
See also
isSleeping() getSleepThreshold() wakeUp() putToSleep()

◆ setSolverIterationCounts()

virtual void PxArticulationBase::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]minPositionItersNumber of position iterations the solver should perform for this articulation. Range: [1,255]
[in]minVelocityItersNumber of velocity iterations the solver should perform for this articulation. Range: [1,255]
See also
getSolverIterationCounts()

◆ setStabilizationThreshold()

virtual void PxArticulationBase::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]thresholdEnergy below which an actor may participate in stabilization. Range: [0,inf)
See also
getStabilizationThreshold() PxSceneFlag::eENABLE_STABILIZATION

◆ setWakeCounter()

virtual void PxArticulationBase::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]wakeCounterValueWake counter value. Range: [0, PX_MAX_F32)
See also
isSleeping() getWakeCounter()

◆ wakeUp()

virtual void PxArticulationBase::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

◆ userData

void* PxArticulationBase::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: