RavEngine
Loading...
Searching...
No Matches
physx::NpArticulationReducedCoordinate Class Reference
Inheritance diagram for physx::NpArticulationReducedCoordinate:
[legend]
Collaboration diagram for physx::NpArticulationReducedCoordinate:
[legend]

Public Member Functions

 NpArticulationReducedCoordinate (PxBaseFlags baseFlags)
 
void preExportDataReset ()
 
virtual void exportExtraData (PxSerializationContext &stream)
 
void importExtraData (PxDeserializationContext &context)
 
void resolveReferences (PxDeserializationContext &context)
 
virtual void requiresObjects (PxProcessPxBaseCallback &c)
 
virtual void release ()
 Releases the articulation, and all its links and corresponding joints.
 
virtual PxScene * getScene () const
 Returns the scene which this articulation belongs to.
 
virtual void setSleepThreshold (PxReal threshold)
 Sets the mass-normalized energy threshold below which the articulation may go to sleep.
 
virtual PxReal getSleepThreshold () const
 Returns the mass-normalized energy below which the articulation may go to sleep.
 
virtual void setStabilizationThreshold (PxReal threshold)
 Sets the mass-normalized kinetic energy threshold below which the articulation may participate in stabilization.
 
virtual PxReal getStabilizationThreshold () const
 Returns the mass-normalized kinetic energy below which the articulation may participate in stabilization.
 
virtual void setWakeCounter (PxReal wakeCounterValue)
 Sets the wake counter for the articulation in seconds.
 
virtual PxReal getWakeCounter () const
 Returns the wake counter of the articulation in seconds.
 
virtual void setSolverIterationCounts (PxU32 positionIters, PxU32 velocityIters)
 Sets the solver iteration counts for the articulation.
 
virtual void getSolverIterationCounts (PxU32 &positionIters, PxU32 &velocityIters) const
 Returns the solver iteration counts.
 
virtual bool isSleeping () const
 Returns true if this articulation is sleeping.
 
virtual void wakeUp ()
 Wakes up the articulation if it is sleeping.
 
virtual void putToSleep ()
 Forces the articulation to sleep.
 
virtual void setMaxCOMLinearVelocity (const PxReal maxLinearVelocity)
 Sets the limit on the magnitude of the linear velocity of the articulation's center of mass.
 
virtual PxReal getMaxCOMLinearVelocity () const
 Gets the limit on the magnitude of the linear velocity of the articulation's center of mass.
 
virtual void setMaxCOMAngularVelocity (const PxReal maxAngularVelocity)
 Sets the limit on the magnitude of the angular velocity at the articulation's center of mass.
 
virtual PxReal getMaxCOMAngularVelocity () const
 Gets the limit on the magnitude of the angular velocity at the articulation's center of mass.
 
virtual PxU32 getNbLinks () const
 Returns the number of links in the articulation.
 
virtual PxU32 getLinks (PxArticulationLink **userBuffer, PxU32 bufferSize, PxU32 startIndex) const
 Returns the set of links in the articulation in the order that they were added to the articulation using createLink.
 
virtual PxU32 getNbShapes () const
 Returns the number of shapes in the articulation.
 
virtual PxBounds3 getWorldBounds (float inflation=1.01f) const
 Returns the axis-aligned bounding box enclosing the articulation.
 
virtual PxAggregate * getAggregate () const
 Returns the aggregate the articulation might be a part of.
 
virtual void setName (const char *name)
 Sets a name string for the articulation that can be retrieved with getName().
 
virtual const char * getName () const
 Returns the name string set with setName().
 
virtual PxArticulationLink * createLink (PxArticulationLink *parent, const PxTransform &pose)
 Adds a link to the articulation with default attribute values.
 
virtual void setArticulationFlags (PxArticulationFlags flags)
 Sets flags on the articulation.
 
virtual void setArticulationFlag (PxArticulationFlag::Enum flag, bool value)
 Raises or clears a flag on the articulation.
 
virtual PxArticulationFlags getArticulationFlags () const
 Returns the articulation's flags.
 
virtual PxU32 getDofs () const
 Returns the total number of joint degrees-of-freedom (DOFs) of the articulation.
 
virtual PxArticulationCache * createCache () const
 Creates an articulation cache that can be used to read and write internal articulation data.
 
virtual PxU32 getCacheDataSize () const
 Returns the size of the articulation cache in bytes.
 
virtual void zeroCache (PxArticulationCache &cache) const
 Zeroes all data in the articulation cache, except user-provided and scratch memory, and cache version.
 
virtual void applyCache (PxArticulationCache &cache, const PxArticulationCacheFlags flags, bool autowake)
 Applies the data in the cache to the articulation.
 
virtual void copyInternalStateToCache (PxArticulationCache &cache, const PxArticulationCacheFlags flags) const
 Copies internal data of the articulation to the cache.
 
virtual void packJointData (const PxReal *maximum, PxReal *reduced) const
 Converts maximal-coordinate joint DOF data to reduced coordinates.
 
virtual void unpackJointData (const PxReal *reduced, PxReal *maximum) const
 Converts reduced-coordinate joint DOF data to maximal coordinates.
 
virtual void commonInit () const
 Prepares common articulation data based on articulation pose for inverse dynamics calculations.
 
virtual void computeGeneralizedGravityForce (PxArticulationCache &cache) const
 Computes the joint DOF forces required to counteract gravitational forces for the given articulation pose.
 
virtual void computeCoriolisAndCentrifugalForce (PxArticulationCache &cache) const
 Computes the joint DOF forces required to counteract Coriolis and centrifugal forces for the given articulation state.
 
virtual void computeGeneralizedExternalForce (PxArticulationCache &cache) const
 Computes the joint DOF forces required to counteract external spatial forces applied to articulation links.
 
virtual void computeJointAcceleration (PxArticulationCache &cache) const
 Computes the joint accelerations for the given articulation state and joint forces.
 
virtual void computeJointForce (PxArticulationCache &cache) const
 Computes the joint forces for the given articulation state and joint accelerations, not considering gravity.
 
virtual void computeDenseJacobian (PxArticulationCache &cache, PxU32 &nRows, PxU32 &nCols) const
 Compute the dense Jacobian for the articulation in world space, including the DOFs of a potentially floating base.
 
virtual void computeCoefficientMatrix (PxArticulationCache &cache) const
 Computes the coefficient matrix for contact forces.
 
virtual bool computeLambda (PxArticulationCache &cache, PxArticulationCache &rollBackCache, const PxReal *const jointTorque, const PxU32 maxIter) const
 Computes the lambda values when the test impulse is 1.
 
virtual void computeGeneralizedMassMatrix (PxArticulationCache &cache) const
 Compute the joint-space inertia matrix that maps joint accelerations to joint forces: forces = M * accelerations.
 
virtual void addLoopJoint (PxConstraint *joint)
 Adds a loop joint to the articulation system for inverse dynamics.
 
virtual void removeLoopJoint (PxConstraint *constraint)
 Removes a loop joint from the articulation for inverse dynamics.
 
virtual PxU32 getNbLoopJoints () const
 Returns the number of loop joints in the articulation for inverse dynamics.
 
virtual PxU32 getLoopJoints (PxConstraint **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const
 Returns the set of loop constraints (i.e. joints) in the articulation.
 
virtual PxU32 getCoefficientMatrixSize () const
 Returns the required size of the coefficient matrix in the articulation.
 
virtual void setRootGlobalPose (const PxTransform &pose, bool autowake=true)
 Sets the root link transform (world to actor frame).
 
virtual PxTransform getRootGlobalPose () const
 Returns the root link transform (world to actor frame).
 
virtual void setRootLinearVelocity (const PxVec3 &velocity, bool autowake=true)
 Sets the root link linear center-of-mass velocity.
 
virtual void setRootAngularVelocity (const PxVec3 &velocity, bool autowake=true)
 Sets the root link angular velocity.
 
virtual PxVec3 getRootLinearVelocity () const
 Gets the root link center-of-mass linear velocity.
 
virtual PxVec3 getRootAngularVelocity () const
 Gets the root link angular velocity.
 
virtual PxSpatialVelocity getLinkAcceleration (const PxU32 linkId)
 Returns the (classical) link acceleration in world space for the given low-level link index.
 
virtual PxU32 getGpuArticulationIndex ()
 Returns the GPU articulation index.
 
virtual const char * getConcreteTypeName () const
 Returns string name of dynamic type.
 
virtual PxArticulationSpatialTendon * createSpatialTendon ()
 Creates a spatial tendon to attach to the articulation with default attribute values.
 
virtual PxU32 getSpatialTendons (PxArticulationSpatialTendon **userBuffer, PxU32 bufferSize, PxU32 startIndex) const
 Returns the spatial tendons attached to the articulation.
 
virtual PxU32 getNbSpatialTendons ()
 Returns the number of spatial tendons in the articulation.
 
NpArticulationSpatialTendon * getSpatialTendon (const PxU32 index) const
 
virtual PxArticulationFixedTendon * createFixedTendon ()
 Creates a fixed tendon to attach to the articulation with default attribute values.
 
virtual PxU32 getFixedTendons (PxArticulationFixedTendon **userBuffer, PxU32 bufferSize, PxU32 startIndex) const
 Returns the fixed tendons attached to the articulation.
 
virtual PxU32 getNbFixedTendons ()
 Returns the number of fixed tendons in the articulation.
 
NpArticulationFixedTendon * getFixedTendon (const PxU32 index) const
 
virtual PxArticulationSensor * createSensor (PxArticulationLink *link, const PxTransform &relativePose)
 Creates a force sensor attached to a link of the articulation.
 
virtual void releaseSensor (PxArticulationSensor &sensor)
 
virtual PxU32 getSensors (PxArticulationSensor **userBuffer, PxU32 bufferSize, PxU32 startIndex) const
 Returns the sensors attached to the articulation.
 
virtual PxU32 getNbSensors ()
 Returns the number of sensors in the articulation.
 
NpArticulationSensor * getSensor (const PxU32 index) const
 
virtual void updateKinematic (PxArticulationKinematicFlags flags)
 Update link velocities and/or positions in the articulation.
 
PX_FORCE_INLINE PxArray< NpArticulationSpatialTendon * > & getSpatialTendons ()
 
PX_FORCE_INLINE PxArray< NpArticulationFixedTendon * > & getFixedTendons ()
 
PX_FORCE_INLINE PxArray< NpArticulationSensor * > & getSensors ()
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance.
 
PxArticulationJointReducedCoordinate * createArticulationJoint (PxArticulationLink &parent, const PxTransform &parentFrame, PxArticulationLink &child, const PxTransform &childFrame)
 
PX_INLINE void incrementShapeCount ()
 
PX_INLINE void decrementShapeCount ()
 
PX_INLINE void addToLinkList (NpArticulationLink &link)
 
PX_INLINE bool removeLinkFromList (NpArticulationLink &link)
 
PX_FORCE_INLINE NpArticulationLink *const * getLinks ()
 
NpArticulationLink * getRoot ()
 
void setAggregate (PxAggregate *a)
 
void wakeUpInternal (bool forceWakeUp, bool autowake)
 
void autoWakeInternal ()
 
void setGlobalPose ()
 
PX_FORCE_INLINE Sc::ArticulationCore & getCore ()
 
PX_FORCE_INLINE const Sc::ArticulationCore & getCore () const
 
PX_INLINE void scSetSolverIterationCounts (PxU16 v)
 
PX_INLINE void scSetSleepThreshold (const PxReal v)
 
PX_INLINE void scSetFreezeThreshold (const PxReal v)
 
PX_INLINE void scSetWakeCounter (PxReal counter)
 
PX_FORCE_INLINE void scSetArticulationFlags (PxArticulationFlags flags)
 
PX_FORCE_INLINE void scWakeUpInternal (PxReal wakeCounter)
 
PX_FORCE_INLINE void scSetMaxLinearVelocity (PxReal maxLinearVelocity)
 
PX_FORCE_INLINE void scSetMaxAngularVelocity (PxReal maxAngularVelocity)
 
void recomputeLinkIDs ()
 
- Public Member Functions inherited from physx::PxBase
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_FORCE_INLINE PxType getConcreteType () const
 Returns concrete type of object.
 
PX_FORCE_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag

 
PX_FORCE_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags

 
PX_FORCE_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags.
 
virtual bool isReleasable () const
 Whether the object is subordinate.
 
- Public Member Functions inherited from physx::NpBase
 NpBase (const PxEMPTY)
 
 NpBase (NpType::Enum type)
 
PX_INLINE bool isAPIWriteForbidden () const
 
PX_INLINE bool isAPIWriteForbiddenExceptSplitSim () const
 
PX_FORCE_INLINE NpType::Enum getNpType () const
 
PX_FORCE_INLINE void setNpScene (NpScene *scene)
 
PX_FORCE_INLINE NpScene * getNpScene () const
 
PX_FORCE_INLINE PxU32 getBaseIndex () const
 
PX_FORCE_INLINE void setBaseIndex (PxU32 index)
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Static Public Member Functions

static NpArticulationReducedCoordinate * createObject (PxU8 *&address, PxDeserializationContext &context)
 
static void getBinaryMetaData (PxOutputStream &stream)
 
static PX_FORCE_INLINE size_t getCoreOffset ()
 
- Static Public Member Functions inherited from physx::NpBase
static void getBinaryMetaData (PxOutputStream &stream)
 

Public Attributes

PX_CATCH_UNDEFINED_ENABLE_DEBUG_VISUALIZATION Sc::ArticulationCore mCore
 
NpArticulationLinkArray mArticulationLinks
 
PxU32 mNumShapes
 
NpAggregate * mAggregate
 
const char * mName
 
PxU32 mCacheVersion
 
bool mTopologyChanged
 
- Public Attributes inherited from physx::PxArticulationReducedCoordinate
void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object.
 

Friends

class NpScene
 

Additional Inherited Members

- Protected Member Functions inherited from physx::PxArticulationReducedCoordinate
PX_INLINE PxArticulationReducedCoordinate (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxArticulationReducedCoordinate (PxBaseFlags baseFlags)
 
- Protected Member Functions inherited from physx::PxBase
PX_INLINE PxBase (PxType concreteType, PxBaseFlags baseFlags)
 Constructor setting concrete type and base flags.
 
PX_INLINE PxBase (PxBaseFlags baseFlags)
 Deserialization constructor setting base flags.
 
virtual ~PxBase ()
 Destructor.
 
template<class T >
bool typeMatch () const
 
- Protected Attributes inherited from physx::PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 
PxU32 mBuiltInRefCount
 
- Protected Attributes inherited from physx::NpBase
PxU32 mFreeSlot
 

Member Function Documentation

◆ addLoopJoint()

void NpArticulationReducedCoordinate::addLoopJoint ( PxConstraint *  joint)
virtual

Adds a loop joint to the articulation system for inverse dynamics.

Parameters
[in]jointThe joint to add.
Note
This call may not be made during simulation.
See also
PxContactJoint, PxFixedJoint, PxSphericalJoint, PxRevoluteJoint, PxPrismaticJoint, PxDistanceJoint, PxD6Joint

Implements physx::PxArticulationReducedCoordinate.

◆ applyCache()

void NpArticulationReducedCoordinate::applyCache ( PxArticulationCache &  cache,
const PxArticulationCacheFlags  flags,
bool  autowake 
)
virtual

Applies the data in the cache to the articulation.

This call wakes the articulation if it is sleeping, and the autowake parameter is true (default) or:

  • a nonzero joint velocity is applied or
  • a nonzero joint force is applied or
  • a nonzero root velocity is applied
Parameters
[in]cacheThe articulation data.
[in]flagsIndicate which data in the cache to apply to the articulation.
[in]autowakeIf true, the call wakes up the articulation and increases the wake counter to PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
PxArticulationCache, PxArticulationCacheFlags, createCache, copyInternalStateToCache, PxScene::applyArticulationData

Implements physx::PxArticulationReducedCoordinate.

◆ commonInit()

void NpArticulationReducedCoordinate::commonInit ( ) const
virtual

Prepares common articulation data based on articulation pose for inverse dynamics calculations.

Usage:

  1. Set articulation pose (joint positions and base transform) via articulation cache and applyCache().
  2. Call commonInit.
  3. Call inverse dynamics computation method.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
computeGeneralizedGravityForce, computeCoriolisAndCentrifugalForce

Implements physx::PxArticulationReducedCoordinate.

◆ computeCoefficientMatrix()

void NpArticulationReducedCoordinate::computeCoefficientMatrix ( PxArticulationCache &  cache) const
virtual

Computes the coefficient matrix for contact forces.

Parameters
[out]cacheOut: PxArticulationCache::coefficientMatrix.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
commonInit, getCoefficientMatrixSize

Implements physx::PxArticulationReducedCoordinate.

◆ computeCoriolisAndCentrifugalForce()

void NpArticulationReducedCoordinate::computeCoriolisAndCentrifugalForce ( PxArticulationCache &  cache) const
virtual

Computes the joint DOF forces required to counteract Coriolis and centrifugal forces for the given articulation state.

  • Inputs: Articulation state (joint positions and velocities (in cache), and base transform and spatial velocity).
  • Outputs: Joint forces to counteract Coriolis and centrifugal forces (in cache).
  • The joint forces returned are determined purely by the articulation's state; i.e. external forces, gravity, and joint accelerations are set to zero. Joint drives and potential damping terms, such as link angular or linear damping, or joint friction, are also not considered in the computation.
  • Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache().
  • commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
Parameters
[in,out]cacheIn: PxArticulationCache::jointVelocity; Out: PxArticulationCache::jointForce.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
commonInit

Implements physx::PxArticulationReducedCoordinate.

◆ computeDenseJacobian()

void NpArticulationReducedCoordinate::computeDenseJacobian ( PxArticulationCache &  cache,
PxU32 &  nRows,
PxU32 &  nCols 
) const
virtual

Compute the dense Jacobian for the articulation in world space, including the DOFs of a potentially floating base.

This computes the dense representation of an inherently sparse matrix. Multiplication with this matrix maps joint space velocities to world-space linear and angular (i.e. spatial) velocities of the centers of mass of the links.

Parameters
[out]cacheSets cache.denseJacobian matrix. The matrix is indexed [nCols * row + column].
[out]nRowsSet to number of rows in matrix, which corresponds to nbLinks() * 6, minus 6 if PxArticulationFlag::eFIX_BASE is true.
[out]nColsSet to number of columns in matrix, which corresponds to the number of joint DOFs, plus 6 in the case PxArticulationFlag::eFIX_BASE is false.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.

Implements physx::PxArticulationReducedCoordinate.

◆ computeGeneralizedExternalForce()

void NpArticulationReducedCoordinate::computeGeneralizedExternalForce ( PxArticulationCache &  cache) const
virtual

Computes the joint DOF forces required to counteract external spatial forces applied to articulation links.

  • Inputs: External forces on links (in cache), articulation pose (joint positions + base transform).
  • Outputs: Joint forces to counteract the external forces (in cache).
  • Only the external spatial forces provided in the cache and the articulation pose are considered in the computation.
  • The external spatial forces are with respect to the links' centers of mass, and not the actor's origin.
  • commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
Parameters
[in,out]cacheIn: PxArticulationCache::externalForces; Out: PxArticulationCache::jointForce.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
commonInit

Implements physx::PxArticulationReducedCoordinate.

◆ computeGeneralizedGravityForce()

void NpArticulationReducedCoordinate::computeGeneralizedGravityForce ( PxArticulationCache &  cache) const
virtual

Computes the joint DOF forces required to counteract gravitational forces for the given articulation pose.

  • Inputs: Articulation pose (joint positions + base transform).
  • Outputs: Joint forces to counteract gravity (in cache).
  • The joint forces returned are determined purely by gravity for the articulation in the current joint and base pose, and joints at rest; i.e. external forces, joint velocities, and joint accelerations are set to zero. Joint drives are also not considered in the computation.
  • commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
Parameters
[out]cacheOut: PxArticulationCache::jointForce.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
commonInit

Implements physx::PxArticulationReducedCoordinate.

◆ computeGeneralizedMassMatrix()

void NpArticulationReducedCoordinate::computeGeneralizedMassMatrix ( PxArticulationCache &  cache) const
virtual

Compute the joint-space inertia matrix that maps joint accelerations to joint forces: forces = M * accelerations.

  • Inputs: Articulation pose (joint positions and base transform).
  • Outputs: Mass matrix (in cache).

commonInit() must be called before the computation, and after setting the articulation pose via applyCache().

Parameters
[out]cacheOut: PxArticulationCache::massMatrix.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
commonInit

Implements physx::PxArticulationReducedCoordinate.

◆ computeJointAcceleration()

void NpArticulationReducedCoordinate::computeJointAcceleration ( PxArticulationCache &  cache) const
virtual

Computes the joint accelerations for the given articulation state and joint forces.

  • Inputs: Joint forces (in cache) and articulation state (joint positions and velocities (in cache), and base transform and spatial velocity).
  • Outputs: Joint accelerations (in cache).
  • The computation includes Coriolis terms and gravity. However, joint drives and potential damping terms are not considered in the computation (for example, linear link damping or joint friction).
  • Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache().
  • commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
Parameters
[in,out]cacheIn: PxArticulationCache::jointForce and PxArticulationCache::jointVelocity; Out: PxArticulationCache::jointAcceleration.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
commonInit

Implements physx::PxArticulationReducedCoordinate.

◆ computeJointForce()

void NpArticulationReducedCoordinate::computeJointForce ( PxArticulationCache &  cache) const
virtual

Computes the joint forces for the given articulation state and joint accelerations, not considering gravity.

  • Inputs: Joint accelerations (in cache) and articulation state (joint positions and velocities (in cache), and base transform and spatial velocity).
  • Outputs: Joint forces (in cache).
  • The computation includes Coriolis terms. However, joint drives and potential damping terms are not considered in the computation (for example, linear link damping or joint friction).
  • Prior to the computation, update/set the base spatial velocity with PxArticulationCache::rootLinkData and applyCache().
  • commonInit() must be called before the computation, and after setting the articulation pose via applyCache().
Parameters
[in,out]cacheIn: PxArticulationCache::jointAcceleration and PxArticulationCache::jointVelocity; Out: PxArticulationCache::jointForce.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
commonInit

Implements physx::PxArticulationReducedCoordinate.

◆ computeLambda()

bool NpArticulationReducedCoordinate::computeLambda ( PxArticulationCache &  cache,
PxArticulationCache &  initialState,
const PxReal *const  jointTorque,
const PxU32  maxIter 
) const
virtual

Computes the lambda values when the test impulse is 1.

Parameters
[out]cacheOut: PxArticulationCache::lambda.
[in]initialStateThe initial state of the articulation system.
[in]jointTorqueM(q)*qddot + C(q,qdot) + g(q) <- calculate by summing joint forces obtained with computeJointForce and computeGeneralizedGravityForce.
[in]maxIterMaximum number of solver iterations to run. If the system converges, fewer iterations may be used.
Returns
True if convergence was achieved within maxIter; False if convergence was not achieved or the operation failed otherwise.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
commonInit, getNbLoopJoints

Implements physx::PxArticulationReducedCoordinate.

◆ copyInternalStateToCache()

void NpArticulationReducedCoordinate::copyInternalStateToCache ( PxArticulationCache &  cache,
const PxArticulationCacheFlags  flags 
) const
virtual

Copies internal data of the articulation to the cache.

Parameters
[in]cacheThe articulation data.
[in]flagsIndicate which data to copy from the articulation to the cache.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
PxArticulationCache, PxArticulationCacheFlags, createCache, applyCache

Implements physx::PxArticulationReducedCoordinate.

◆ createCache()

PxArticulationCache * NpArticulationReducedCoordinate::createCache ( ) const
virtual

Creates an articulation cache that can be used to read and write internal articulation data.

  • When the structure of the articulation changes (e.g. adding a link or sensor) after the cache was created, the cache needs to be released and recreated.
  • Free the memory allocated for the cache by calling the release() method on the cache.
  • Caches can only be created by articulations that are in a scene.
Returns
The cache, or NULL if the articulation is not in a scene.
See also
applyCache, copyInternalStateToCache

Implements physx::PxArticulationReducedCoordinate.

◆ createFixedTendon()

PxArticulationFixedTendon * NpArticulationReducedCoordinate::createFixedTendon ( )
virtual

Creates a fixed tendon to attach to the articulation with default attribute values.

Returns
The new fixed tendon.
Note
Creating a fixed tendon is not allowed while the articulation is in a scene. In order to add the tendon, remove and then re-add the articulation to the scene.
See also
PxArticulationFixedTendon

Implements physx::PxArticulationReducedCoordinate.

◆ createLink()

PxArticulationLink * NpArticulationReducedCoordinate::createLink ( PxArticulationLink *  parent,
const PxTransform &  pose 
)
virtual

Adds a link to the articulation with default attribute values.

Parameters
[in]parentThe parent link in the articulation. Must 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.
Note
Creating a link is not allowed while the articulation is in a scene. In order to add a link, remove and then re-add the articulation to the scene.
See also
PxArticulationLink

Implements physx::PxArticulationReducedCoordinate.

◆ createSensor()

PxArticulationSensor * NpArticulationReducedCoordinate::createSensor ( PxArticulationLink *  link,
const PxTransform &  relativePose 
)
virtual

Creates a force sensor attached to a link of the articulation.

Parameters
[in]linkThe link to attach the sensor to.
[in]relativePoseThe sensor frame's relative pose to the link's body frame, i.e. the transform body frame -> sensor frame. The link body frame is at the center of mass and aligned with the principal axes of inertia, see PxRigidBody::getCMassLocalPose.
Returns
The new sensor.
Note
Creating a sensor is not allowed while the articulation is in a scene. In order to add the sensor, remove and then re-add the articulation to the scene.
See also
PxArticulationSensor

Implements physx::PxArticulationReducedCoordinate.

◆ createSpatialTendon()

PxArticulationSpatialTendon * NpArticulationReducedCoordinate::createSpatialTendon ( )
virtual

Creates a spatial tendon to attach to the articulation with default attribute values.

Returns
The new spatial tendon.
Note
Creating a spatial tendon is not allowed while the articulation is in a scene. In order to add the tendon, remove and then re-add the articulation to the scene.
See also
PxArticulationSpatialTendon

Implements physx::PxArticulationReducedCoordinate.

◆ getAggregate()

PxAggregate * NpArticulationReducedCoordinate::getAggregate ( ) const
virtual

Returns 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

Implements physx::PxArticulationReducedCoordinate.

◆ getArticulationFlags()

PxArticulationFlags NpArticulationReducedCoordinate::getArticulationFlags ( ) const
virtual

Returns the articulation's flags.

Returns
The flags.
See also
PxArticulationFlag

Implements physx::PxArticulationReducedCoordinate.

◆ getCacheDataSize()

PxU32 NpArticulationReducedCoordinate::getCacheDataSize ( ) const
virtual

Returns the size of the articulation cache in bytes.

  • The size does not include: the user-allocated memory for the coefficient matrix or lambda values; the scratch-related memory/members; and the cache version. See comment in #PxArticulationCache.
  • The return value is only valid for articulations that are in a scene.
Returns
The byte size of the cache, or 0xFFFFFFFF if the articulation is not in a scene.
See also
PxArticulationCache

Implements physx::PxArticulationReducedCoordinate.

◆ getCoefficientMatrixSize()

PxU32 NpArticulationReducedCoordinate::getCoefficientMatrixSize ( ) const
virtual

Returns the required size of the coefficient matrix in the articulation.

Returns
Size of the coefficient matrix (equal to getDofs() * getNbLoopJoints()).
Note
This call may only be made on articulations that are in a scene.
See also
computeCoefficientMatrix

Implements physx::PxArticulationReducedCoordinate.

◆ getConcreteTypeName()

virtual const char * physx::NpArticulationReducedCoordinate::getConcreteTypeName ( ) const
inlinevirtual

Returns string name of dynamic type.

Returns
Class name of most derived type of this object.

Implements physx::PxBase.

◆ getDofs()

PxU32 NpArticulationReducedCoordinate::getDofs ( ) const
virtual

Returns the total number of joint degrees-of-freedom (DOFs) of the articulation.

  • The six DOFs of the base of a floating-base articulation are not included in this count.
  • Example: Both a fixed-base and a floating-base double-pendulum with two revolute joints will have getDofs() == 2.
  • The return value is only valid for articulations that are in a scene.
Returns
The number of joint DOFs, or 0xFFFFFFFF if the articulation is not in a scene.

Implements physx::PxArticulationReducedCoordinate.

◆ getFixedTendons()

PxU32 NpArticulationReducedCoordinate::getFixedTendons ( PxArticulationFixedTendon **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex 
) const
virtual

Returns the fixed tendons attached to the articulation.

The order of the tendons in the buffer is not necessarily identical to the order in which the tendons were added to the articulation.

Parameters
[in]userBufferThe buffer into which to write the array of pointers to the tendons.
[in]bufferSizeThe size of the buffer. If this is not large enough to contain all the pointers to tendons, only as many as will fit are written. Use getNbFixedTendons to size for all attached tendons.
[in]startIndexIndex of first tendon pointer to be retrieved.
Returns
The number of tendons written into the buffer.
See also
PxArticulationFixedTendon, getNbFixedTendons

Implements physx::PxArticulationReducedCoordinate.

◆ getGpuArticulationIndex()

PxU32 NpArticulationReducedCoordinate::getGpuArticulationIndex ( )
virtual

Returns the GPU articulation index.

Returns
The GPU index, or 0xFFFFFFFF if the articulation is not in a scene or PxSceneFlag::eSUPPRESS_READBACK is not set.

Implements physx::PxArticulationReducedCoordinate.

◆ getLinkAcceleration()

PxSpatialVelocity NpArticulationReducedCoordinate::getLinkAcceleration ( const PxU32  linkId)
virtual

Returns the (classical) link acceleration in world space for the given low-level link index.

Parameters
[in]linkIdThe low-level link index, see PxArticulationLink::getLinkIndex.
Returns
The link's center-of-mass classical acceleration, or 0 if the call is made before the articulation participated in a first simulation step.
Note
This call may only be made on articulations that are in a scene, and it is not allowed to use this method while the simulation is running except in a split simulation during PxScene::collide() and up to PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
See also
PxArticulationLink::getLinkIndex, PxRigidBody::getCMassLocalPose

Implements physx::PxArticulationReducedCoordinate.

◆ getLinks()

PxU32 NpArticulationReducedCoordinate::getLinks ( PxArticulationLink **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex 
) const
virtual

Returns the set of links in the articulation in the order that they were added to the articulation using createLink.

Parameters
[in]userBufferBuffer into which to write the array of articulation link pointers.
[in]bufferSizeThe size of the buffer. If the buffer 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
PxArticulationLink

Implements physx::PxArticulationReducedCoordinate.

◆ getLoopJoints()

PxU32 NpArticulationReducedCoordinate::getLoopJoints ( PxConstraint **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
virtual

Returns the set of loop constraints (i.e. joints) in the articulation.

Parameters
[in]userBufferTarget buffer for the constraint pointers.
[in]bufferSizeThe size of the buffer. If this is not large enough to contain all the pointers to the constraints, only as many as will fit are written. Use getNbLoopJoints() to size the buffer for retrieving all constraints.
[in]startIndexIndex of first constraint pointer to be retrieved.
Returns
The number of constraints written into the buffer.

Implements physx::PxArticulationReducedCoordinate.

◆ getMaxCOMAngularVelocity()

PxReal NpArticulationReducedCoordinate::getMaxCOMAngularVelocity ( ) const
virtual

Gets the limit on the magnitude of the angular velocity at the articulation's center of mass.

Returns
The maximal angular velocity magnitude.
See also
setMaxCOMAngularVelocity

Implements physx::PxArticulationReducedCoordinate.

◆ getMaxCOMLinearVelocity()

PxReal NpArticulationReducedCoordinate::getMaxCOMLinearVelocity ( ) const
virtual

Gets the limit on the magnitude of the linear velocity of the articulation's center of mass.

Returns
The maximal linear velocity magnitude.
See also
setMaxCOMLinearVelocity

Implements physx::PxArticulationReducedCoordinate.

◆ getName()

const char * NpArticulationReducedCoordinate::getName ( ) const
virtual

Returns the name string set with setName().

Returns
Name string associated with the articulation.
See also
setName()

Implements physx::PxArticulationReducedCoordinate.

◆ getNbFixedTendons()

PxU32 NpArticulationReducedCoordinate::getNbFixedTendons ( )
virtual

Returns the number of fixed tendons in the articulation.

Returns
The number of tendons.

Implements physx::PxArticulationReducedCoordinate.

◆ getNbLinks()

PxU32 NpArticulationReducedCoordinate::getNbLinks ( ) const
virtual

Returns the number of links in the articulation.

Returns
The number of links.

Implements physx::PxArticulationReducedCoordinate.

◆ getNbLoopJoints()

PxU32 NpArticulationReducedCoordinate::getNbLoopJoints ( ) const
virtual

Returns the number of loop joints in the articulation for inverse dynamics.

Returns
The number of loop joints.

Implements physx::PxArticulationReducedCoordinate.

◆ getNbSensors()

PxU32 NpArticulationReducedCoordinate::getNbSensors ( )
virtual

Returns the number of sensors in the articulation.

Returns
The number of sensors.

Implements physx::PxArticulationReducedCoordinate.

◆ getNbShapes()

PxU32 NpArticulationReducedCoordinate::getNbShapes ( ) const
virtual

Returns the number of shapes in the articulation.

Returns
The number of shapes.

Implements physx::PxArticulationReducedCoordinate.

◆ getNbSpatialTendons()

PxU32 NpArticulationReducedCoordinate::getNbSpatialTendons ( )
virtual

Returns the number of spatial tendons in the articulation.

Returns
The number of tendons.

Implements physx::PxArticulationReducedCoordinate.

◆ getRootAngularVelocity()

PxVec3 NpArticulationReducedCoordinate::getRootAngularVelocity ( ) const
virtual

Gets the root link angular velocity.

For performance, prefer PxArticulationCache::rootLinkData to get the root link velocity in a batch query.

Returns
The root link angular velocity.
Note
This call is not allowed while the simulation is running except in a split simulation during PxScene::collide() and up to PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
See also
setRootAngularVelocity, setRootLinearVelocity, getRootLinearVelocity, PxArticulationCache, applyCache

Implements physx::PxArticulationReducedCoordinate.

◆ getRootGlobalPose()

PxTransform NpArticulationReducedCoordinate::getRootGlobalPose ( ) const
virtual

Returns the root link transform (world to actor frame).

For performance, prefer PxArticulationCache::rootLinkData to get the root link transform in a batch query.

Returns
The root link transform.
Note
This call is not allowed while the simulation is running except in a split simulation during PxScene::collide() and up to PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
See also
setRootGlobalPose, PxArticulationCache, copyInternalStateToCache

Implements physx::PxArticulationReducedCoordinate.

◆ getRootLinearVelocity()

PxVec3 NpArticulationReducedCoordinate::getRootLinearVelocity ( ) const
virtual

Gets the root link center-of-mass linear velocity.

  • The linear velocity is with respect to the link's center of mass and not the actor frame origin.
  • For performance, prefer PxArticulationCache::rootLinkData to get the root link velocity in a batch query.
Returns
The root link center-of-mass linear velocity.
Note
This call is not allowed while the simulation is running except in a split simulation during PxScene::collide() and up to PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
See also
setRootLinearVelocity, setRootAngularVelocity, getRootAngularVelocity, PxRigidBody::getCMassLocalPose, PxArticulationCache, applyCache

Implements physx::PxArticulationReducedCoordinate.

◆ getScene()

virtual PxScene * physx::NpArticulationReducedCoordinate::getScene ( ) const
inlinevirtual

Returns the scene which this articulation belongs to.

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

Implements physx::PxArticulationReducedCoordinate.

◆ getSensors()

PxU32 NpArticulationReducedCoordinate::getSensors ( PxArticulationSensor **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex 
) const
virtual

Returns the sensors attached to the articulation.

The order of the sensors in the buffer is not necessarily identical to the order in which the sensors were added to the articulation.

Parameters
[in]userBufferThe buffer into which to write the array of pointers to the sensors.
[in]bufferSizeThe size of the buffer. If this is not large enough to contain all the pointers to sensors, only as many as will fit are written. Use getNbSensors to size for all attached sensors.
[in]startIndexIndex of first sensor pointer to be retrieved.
Returns
The number of sensors written into the buffer.
See also
PxArticulationSensor, getNbSensors

Implements physx::PxArticulationReducedCoordinate.

◆ getSleepThreshold()

PxReal NpArticulationReducedCoordinate::getSleepThreshold ( ) const
virtual

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

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

Implements physx::PxArticulationReducedCoordinate.

◆ getSolverIterationCounts()

void NpArticulationReducedCoordinate::getSolverIterationCounts ( PxU32 &  minPositionIters,
PxU32 &  minVelocityIters 
) const
virtual

Returns the solver iteration counts.

See also
setSolverIterationCounts()

Implements physx::PxArticulationReducedCoordinate.

◆ getSpatialTendons()

PxU32 NpArticulationReducedCoordinate::getSpatialTendons ( PxArticulationSpatialTendon **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex 
) const
virtual

Returns the spatial tendons attached to the articulation.

The order of the tendons in the buffer is not necessarily identical to the order in which the tendons were added to the articulation.

Parameters
[in]userBufferThe buffer into which to write the array of pointers to the tendons.
[in]bufferSizeThe size of the buffer. If this is not large enough to contain all the pointers to tendons, only as many as will fit are written. Use getNbSpatialTendons to size for all attached tendons.
[in]startIndexIndex of first tendon pointer to be retrieved.
Returns
The number of tendons written into the buffer.
See also
PxArticulationSpatialTendon, getNbSpatialTendons

Implements physx::PxArticulationReducedCoordinate.

◆ getStabilizationThreshold()

PxReal NpArticulationReducedCoordinate::getStabilizationThreshold ( ) const
virtual

Returns the mass-normalized kinetic energy below which the 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

Implements physx::PxArticulationReducedCoordinate.

◆ getWakeCounter()

PxReal NpArticulationReducedCoordinate::getWakeCounter ( ) const
virtual

Returns the wake counter of the articulation in seconds.

Returns
The wake counter of the articulation in seconds.
Note
This call may not be made during simulation, except in a split simulation in-between PxScene::fetchCollision and PxScene::advance.
See also
isSleeping() setWakeCounter()

Implements physx::PxArticulationReducedCoordinate.

◆ getWorldBounds()

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

Returns 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.
Note
It is not allowed to use this method while the simulation is running, except in a split simulation during PxScene::collide() and up to PxScene::advance(), and in PxContactModifyCallback or in contact report callbacks.
See also
PxBounds3

Implements physx::PxArticulationReducedCoordinate.

◆ isKindOf()

virtual bool physx::NpArticulationReducedCoordinate::isKindOf ( const char *  superClass) const
inlinevirtual

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

Reimplemented from physx::PxBase.

◆ isSleeping()

bool NpArticulationReducedCoordinate::isSleeping ( ) const
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 objects.

Returns
True if the articulation is sleeping.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation, except in a split simulation in-between PxScene::fetchCollision and PxScene::advance.
See also
wakeUp() putToSleep() getSleepThreshold()

Implements physx::PxArticulationReducedCoordinate.

◆ packJointData()

void NpArticulationReducedCoordinate::packJointData ( const PxReal *  maximum,
PxReal *  reduced 
) const
virtual

Converts maximal-coordinate joint DOF data to reduced coordinates.

  • Indexing into the maximal joint DOF data is via the link's low-level index minus 1 (the root link is not included).
  • The reduced-coordinate data follows the cache indexing convention, see PxArticulationCache::jointVelocity.
Parameters
[in]maximumThe maximal-coordinate joint DOF data, N = (getNbLinks() - 1) * 6
[out]reducedThe reduced-coordinate joint DOF data, N = getDofs()
Note
The articulation must be in a scene.
See also
unpackJointData

Implements physx::PxArticulationReducedCoordinate.

◆ putToSleep()

void NpArticulationReducedCoordinate::putToSleep ( )
virtual

Forces the articulation to sleep.

  • The articulation will stay asleep during the next simulation step if not touched by another non-sleeping actor.
  • This will set any applied force, the velocity, and the wake counter of all bodies in the articulation to zero.
Note
This call may not be made during simulation, and may only be made on articulations that are in a scene.
See also
isSleeping() wakeUp()

Implements physx::PxArticulationReducedCoordinate.

◆ release()

void NpArticulationReducedCoordinate::release ( )
virtual

Releases the articulation, and all its links and corresponding joints.

Attached sensors and tendons are released automatically when the articulation is released.

Note
This call may not be made during simulation.

!!AL TODO: Order should not matter in this case. Optimize by having a path which does not restrict release to leaf links or

Implements physx::PxArticulationReducedCoordinate.

◆ removeLoopJoint()

void NpArticulationReducedCoordinate::removeLoopJoint ( PxConstraint *  joint)
virtual

Removes a loop joint from the articulation for inverse dynamics.

Note
This call may not be made during simulation.
Parameters
[in]jointThe joint to remove.

Implements physx::PxArticulationReducedCoordinate.

◆ setArticulationFlag()

void NpArticulationReducedCoordinate::setArticulationFlag ( PxArticulationFlag::Enum  flag,
bool  value 
)
virtual

Raises or clears a flag on the articulation.

Parameters
[in]flagThe articulation flag.
[in]valueThe value to set the flag to.
Note
This call may not be made during simulation.
See also
PxArticulationFlag

Implements physx::PxArticulationReducedCoordinate.

◆ setArticulationFlags()

void NpArticulationReducedCoordinate::setArticulationFlags ( PxArticulationFlags  flags)
virtual

Sets flags on the articulation.

Parameters
[in]flagsThe articulation flags.
Note
This call may not be made during simulation.
See also
PxArticulationFlag

Implements physx::PxArticulationReducedCoordinate.

◆ setMaxCOMAngularVelocity()

void NpArticulationReducedCoordinate::setMaxCOMAngularVelocity ( const PxReal  maxAngularVelocity)
virtual

Sets the limit on the magnitude of the angular velocity at the articulation's center of mass.

  • The limit acts on the angular velocity of the entire articulation. The velocity is calculated from the total momentum and the spatial inertia of the articulation.
  • The limit only applies to floating-base articulations.
  • A benefit of the COM velocity limit is that it is evenly applied to the whole articulation, which results in fewer visual artifacts compared to link rigid-body damping or joint-velocity limits. However, these per-link or per-degree-of-freedom limits may still help avoid numerical issues.
Note
This call may not be made during simulation.
Parameters
[in]maxAngularVelocityThe maximal angular velocity magnitude. Range: [0, PX_MAX_F32); Default: PX_MAX_F32.
See also
setMaxCOMLinearVelocity, PxRigidBody::setLinearDamping, PxRigidBody::setAngularDamping, PxArticulationJointReducedCoordinate::setMaxJointVelocity

Implements physx::PxArticulationReducedCoordinate.

◆ setMaxCOMLinearVelocity()

void NpArticulationReducedCoordinate::setMaxCOMLinearVelocity ( const PxReal  maxLinearVelocity)
virtual

Sets the limit on the magnitude of the linear velocity of the articulation's center of mass.

  • The limit acts on the linear velocity of the entire articulation. The velocity is calculated from the total momentum and the spatial inertia of the articulation.
  • The limit only applies to floating-base articulations.
  • A benefit of the COM velocity limit is that it is evenly applied to the whole articulation, which results in fewer visual artifacts compared to link rigid-body damping or joint-velocity limits. However, these per-link or per-degree-of-freedom limits may still help avoid numerical issues.
Note
This call may not be made during simulation.
Parameters
[in]maxLinearVelocityThe maximal linear velocity magnitude. Range: [0, PX_MAX_F32); Default: PX_MAX_F32.
See also
setMaxCOMAngularVelocity, PxRigidBody::setLinearDamping, PxRigidBody::setAngularDamping, PxArticulationJointReducedCoordinate::setMaxJointVelocity

Implements physx::PxArticulationReducedCoordinate.

◆ setName()

void NpArticulationReducedCoordinate::setName ( const char *  name)
virtual

Sets a name string for the articulation 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 articulation's name to.
See also
getName()

Implements physx::PxArticulationReducedCoordinate.

◆ setRootAngularVelocity()

void NpArticulationReducedCoordinate::setRootAngularVelocity ( const PxVec3 &  angularVelocity,
bool  autowake = true 
)
virtual

Sets the root link angular velocity.

  • For performance, prefer PxArticulationCache::rootLinkData to set the root link velocity in a batch articulation state update.
  • The articulation is woken up if the input velocity is nonzero (ignoring autowake) and the articulation is in a scene.
  • Use updateKinematic() after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
Parameters
[in]angularVelocityThe new root link angular velocity.
[in]autowakeIf true and the articulation is in a scene, the call wakes up the articulation and increases the wake counter to PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.
Note
This call may not be made during simulation, except in a split simulation in-between PxScene::fetchCollision and PxScene::advance.
See also
updateKinematic, getRootAngularVelocity, setRootLinearVelocity, getRootLinearVelocity, PxArticulationCache, applyCache

Implements physx::PxArticulationReducedCoordinate.

◆ setRootGlobalPose()

void NpArticulationReducedCoordinate::setRootGlobalPose ( const PxTransform &  pose,
bool  autowake = true 
)
virtual

Sets the root link transform (world to actor frame).

  • For performance, prefer PxArticulationCache::rootLinkData to set the root link transform in a batch articulation state update.
  • Use updateKinematic() after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
Parameters
[in]poseThe new root link transform.
[in]autowakeIf true and the articulation is in a scene, the call wakes up the articulation and increases the wake counter to PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.
Note
This call may not be made during simulation.
See also
getRootGlobalPose, updateKinematic, PxArticulationCache, applyCache

Implements physx::PxArticulationReducedCoordinate.

◆ setRootLinearVelocity()

void NpArticulationReducedCoordinate::setRootLinearVelocity ( const PxVec3 &  linearVelocity,
bool  autowake = true 
)
virtual

Sets the root link linear center-of-mass velocity.

  • The linear velocity is with respect to the link's center of mass and not the actor frame origin.
  • For performance, prefer PxArticulationCache::rootLinkData to set the root link velocity in a batch articulation state update.
  • The articulation is woken up if the input velocity is nonzero (ignoring autowake) and the articulation is in a scene.
  • Use updateKinematic() after all state updates to the articulation via non-cache API such as this method, in order to update link states for the next simulation frame or querying.
Parameters
[in]linearVelocityThe new root link center-of-mass linear velocity.
[in]autowakeIf true and the articulation is in a scene, the call wakes up the articulation and increases the wake counter to PxSceneDesc::wakeCounterResetValue if the counter value is below the reset value.
Note
This call may not be made during simulation, except in a split simulation in-between PxScene::fetchCollision and PxScene::advance.
See also
updateKinematic, getRootLinearVelocity, setRootAngularVelocity, getRootAngularVelocity, PxRigidBody::getCMassLocalPose, PxArticulationCache, applyCache

Implements physx::PxArticulationReducedCoordinate.

◆ setSleepThreshold()

void NpArticulationReducedCoordinate::setSleepThreshold ( PxReal  threshold)
virtual

Sets the mass-normalized energy threshold below which the articulation may go to sleep.

The articulation will sleep if the energy of each link is below this threshold.

Parameters
[in]thresholdEnergy below which the articulation may go to sleep. Range: [0, PX_MAX_F32)
Note
This call may not be made during simulation.
See also
isSleeping() getSleepThreshold() wakeUp() putToSleep()

Implements physx::PxArticulationReducedCoordinate.

◆ setSolverIterationCounts()

void NpArticulationReducedCoordinate::setSolverIterationCounts ( PxU32  minPositionIters,
PxU32  minVelocityIters 
)
virtual

Sets the solver iteration counts for the articulation.

The solver iteration count determines how accurately contacts, drives, and limits are resolved. Setting a higher position iteration count may therefore help in scenarios where the articulation is subject to many constraints; for example, a manipulator articulation with drives and joint limits that is grasping objects, or several such articulations interacting through contacts. Other situations where higher position iterations may improve simulation fidelity are: large mass ratios within the articulation or between the articulation and an object in contact with it; or strong drives in the articulation being used to manipulate a light object.

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]
Note
This call may not be made during simulation.
See also
getSolverIterationCounts()

Implements physx::PxArticulationReducedCoordinate.

◆ setStabilizationThreshold()

void NpArticulationReducedCoordinate::setStabilizationThreshold ( PxReal  threshold)
virtual

Sets the mass-normalized kinetic energy threshold below which the articulation may participate in stabilization.

Articulations 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 the articulation may participate in stabilization. Range: [0,inf)
Note
This call may not be made during simulation.
See also
getStabilizationThreshold() PxSceneFlag::eENABLE_STABILIZATION

Implements physx::PxArticulationReducedCoordinate.

◆ setWakeCounter()

void NpArticulationReducedCoordinate::setWakeCounter ( PxReal  wakeCounterValue)
virtual

Sets the wake counter for the articulation in seconds.

  • The wake counter value determines the minimum amount of time until the articulation can be put to sleep.
  • 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.
  • Passing in a positive value will wake up the articulation automatically.

Default: 0.4s (which corresponds to 20 frames for a time step of 0.02s)

Parameters
[in]wakeCounterValueWake counter value in seconds. Range: [0, PX_MAX_F32)
Note
This call may not be made during simulation, except in a split simulation in-between PxScene::fetchCollision and PxScene::advance.
See also
isSleeping() getWakeCounter()

Implements physx::PxArticulationReducedCoordinate.

◆ unpackJointData()

void NpArticulationReducedCoordinate::unpackJointData ( const PxReal *  reduced,
PxReal *  maximum 
) const
virtual

Converts reduced-coordinate joint DOF data to maximal coordinates.

  • Indexing into the maximal joint DOF data is via the link's low-level index minus 1 (the root link is not included).
  • The reduced-coordinate data follows the cache indexing convention, see PxArticulationCache::jointVelocity.
Parameters
[in]reducedThe reduced-coordinate joint DOF data, N = getDofs().
[out]maximumThe maximal-coordinate joint DOF data, N = (getNbLinks() - 1) * 6.
Note
The articulation must be in a scene.
See also
packJointData

Implements physx::PxArticulationReducedCoordinate.

◆ updateKinematic()

void NpArticulationReducedCoordinate::updateKinematic ( PxArticulationKinematicFlags  flags)
virtual

Update link velocities and/or positions in the articulation.

For performance, prefer the PxArticulationCache API that performs batch articulation state updates.

If the application updates the root state (position and velocity) or joint state via any combination of the non-cache API calls

the application needs to call this method after the state setting in order to update the link states for the next simulation frame or querying.

Use

Note
This call may only be made on articulations that are in a scene, and may not be made during simulation.
See also
PxArticulationKinematicFlags, PxArticulationCache, applyCache

Implements physx::PxArticulationReducedCoordinate.

◆ wakeUp()

void NpArticulationReducedCoordinate::wakeUp ( )
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.
  • This will set the wake counter of the articulation to the value specified in PxSceneDesc::wakeCounterResetValue.
Note
This call may only be made on articulations that are in a scene, and may not be made during simulation, except in a split simulation in-between PxScene::fetchCollision and PxScene::advance.
See also
isSleeping() putToSleep()

Implements physx::PxArticulationReducedCoordinate.

◆ zeroCache()

void NpArticulationReducedCoordinate::zeroCache ( PxArticulationCache &  cache) const
virtual

Zeroes all data in the articulation cache, except user-provided and scratch memory, and cache version.

Note
This call may only be made on articulations that are in a scene.
See also
PxArticulationCache

Implements physx::PxArticulationReducedCoordinate.


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