RavEngine
Loading...
Searching...
No Matches
physx::PxArticulationLink Class Referenceabstract

A component of an articulation that represents a rigid body. More...

#include <PxArticulationLink.h>

Inheritance diagram for physx::PxArticulationLink:
[legend]
Collaboration diagram for physx::PxArticulationLink:
[legend]

Public Member Functions

virtual void release ()=0
 Releases the link from the articulation.
 
virtual PxArticulationReducedCoordinate & getArticulation () const =0
 Gets the articulation that the link is a part of.
 
virtual PxArticulationJointReducedCoordinate * getInboundJoint () const =0
 Gets the joint which connects this link to its parent.
 
virtual PxU32 getInboundJointDof () const =0
 Gets the number of degrees of freedom of the joint which connects this link to its parent.
 
virtual PxU32 getNbChildren () const =0
 Gets the number of child links.
 
virtual PxU32 getLinkIndex () const =0
 Gets the low-level link index that may be used to index into members of PxArticulationCache.
 
virtual PxU32 getChildren (PxArticulationLink **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Retrieves the child links.
 
virtual void setCfmScale (const PxReal cfm)=0
 Set the constraint-force-mixing scale term.
 
virtual PxReal getCfmScale () const =0
 Get the constraint-force-mixing scale term.
 
virtual PxVec3 getLinearVelocity () const =0
 Get the linear velocity of the link.
 
virtual PxVec3 getAngularVelocity () const =0
 Get the angular velocity of the link.
 
virtual const char * getConcreteTypeName () const
 Returns the string name of the dynamic type.
 
- Public Member Functions inherited from physx::PxRigidBody
virtual void setCMassLocalPose (const PxTransform &pose)=0
 Sets the pose of the center of mass relative to the actor.

 
virtual PxTransform getCMassLocalPose () const =0
 Retrieves the center of mass pose relative to the actor frame.
 
virtual void setMass (PxReal mass)=0
 Sets the mass of a dynamic actor.
 
virtual PxReal getMass () const =0
 Retrieves the mass of the actor.
 
virtual PxReal getInvMass () const =0
 Retrieves the inverse mass of the actor.
 
virtual void setMassSpaceInertiaTensor (const PxVec3 &m)=0
 Sets the inertia tensor, using a parameter specified in mass space coordinates.
 
virtual PxVec3 getMassSpaceInertiaTensor () const =0
 Retrieves the diagonal inertia tensor of the actor relative to the mass coordinate frame.
 
virtual PxVec3 getMassSpaceInvInertiaTensor () const =0
 Retrieves the diagonal inverse inertia tensor of the actor relative to the mass coordinate frame.
 
virtual void setLinearDamping (PxReal linDamp)=0
 Sets the linear damping coefficient.
 
virtual PxReal getLinearDamping () const =0
 Retrieves the linear damping coefficient.
 
virtual void setAngularDamping (PxReal angDamp)=0
 Sets the angular damping coefficient.
 
virtual PxReal getAngularDamping () const =0
 Retrieves the angular damping coefficient.
 
virtual void setMaxLinearVelocity (PxReal maxLinVel)=0
 Lets you set the maximum linear velocity permitted for this actor.
 
virtual PxReal getMaxLinearVelocity () const =0
 Retrieves the maximum angular velocity permitted for this actor.
 
virtual void setMaxAngularVelocity (PxReal maxAngVel)=0
 Lets you set the maximum angular velocity permitted for this actor.
 
virtual PxReal getMaxAngularVelocity () const =0
 Retrieves the maximum angular velocity permitted for this actor.
 
virtual void addForce (const PxVec3 &force, PxForceMode::Enum mode=PxForceMode::eFORCE, bool autowake=true)=0
 Applies a force (or impulse) defined in the global coordinate frame to the actor at its center of mass.
 
virtual void addTorque (const PxVec3 &torque, PxForceMode::Enum mode=PxForceMode::eFORCE, bool autowake=true)=0
 Applies an impulsive torque defined in the global coordinate frame to the actor.
 
virtual void clearForce (PxForceMode::Enum mode=PxForceMode::eFORCE)=0
 Clears the accumulated forces (sets the accumulated force back to zero).
 
virtual void clearTorque (PxForceMode::Enum mode=PxForceMode::eFORCE)=0
 Clears the impulsive torque defined in the global coordinate frame to the actor.
 
virtual void setForceAndTorque (const PxVec3 &force, const PxVec3 &torque, PxForceMode::Enum mode=PxForceMode::eFORCE)=0
 Sets the impulsive force and torque defined in the global coordinate frame to the actor.
 
virtual void setRigidBodyFlag (PxRigidBodyFlag::Enum flag, bool value)=0
 Raises or clears a particular rigid body flag.
 
virtual void setRigidBodyFlags (PxRigidBodyFlags inFlags)=0
 
virtual PxRigidBodyFlags getRigidBodyFlags () const =0
 Reads the PxRigidBody flags.
 
virtual void setMinCCDAdvanceCoefficient (PxReal advanceCoefficient)=0
 Sets the CCD minimum advance coefficient.
 
virtual PxReal getMinCCDAdvanceCoefficient () const =0
 Gets the CCD minimum advance coefficient.
 
virtual void setMaxDepenetrationVelocity (PxReal biasClamp)=0
 Sets the maximum depenetration velocity permitted to be introduced by the solver. This value controls how much velocity the solver can introduce to correct for penetrations in contacts.
 
virtual PxReal getMaxDepenetrationVelocity () const =0
 Returns the maximum depenetration velocity the solver is permitted to introduced. This value controls how much velocity the solver can introduce to correct for penetrations in contacts.
 
virtual void setMaxContactImpulse (PxReal maxImpulse)=0
 Sets a limit on the impulse that may be applied at a contact. The maximum impulse at a contact between two dynamic or kinematic bodies will be the minimum of the two limit values. For a collision between a static and a dynamic body, the impulse is limited by the value for the dynamic body.
 
virtual PxReal getMaxContactImpulse () const =0
 Returns the maximum impulse that may be applied at a contact.
 
virtual void setContactSlopCoefficient (PxReal slopCoefficient)=0
 Sets a distance scale whereby the angular influence of a contact on the normal constraint in a contact is zeroed if normal.cross(offset) falls below this tolerance. Rather than acting as an absolute value, this tolerance is scaled by the ratio rXn.dot(angVel)/normal.dot(linVel) such that contacts that have relatively larger angular velocity than linear normal velocity (e.g. rolling wheels) achieve larger slop values as the angular velocity increases.
 
virtual PxReal getContactSlopCoefficient () const =0
 Returns the contact slop coefficient.
 
virtual PxNodeIndex getInternalIslandNodeIndex () const =0
 Returns the island node index.
 
- Public Member Functions inherited from physx::PxRigidActor
virtual PxU32 getInternalActorIndex () const =0
 Returns the internal actor index.
 
virtual PxTransform getGlobalPose () const =0
 Retrieves the actors world space transform.
 
virtual void setGlobalPose (const PxTransform &pose, bool autowake=true)=0
 Method for setting an actor's pose in the world.
 
virtual bool attachShape (PxShape &shape)=0
 Attach a shape to an actor.
 
virtual void detachShape (PxShape &shape, bool wakeOnLostTouch=true)=0
 Detach a shape from an actor.
 
virtual PxU32 getNbShapes () const =0
 Returns the number of shapes assigned to the actor.
 
virtual PxU32 getShapes (PxShape **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Retrieve all the shape pointers belonging to the actor.
 
virtual PxU32 getNbConstraints () const =0
 Returns the number of constraint shaders attached to the actor.
 
virtual PxU32 getConstraints (PxConstraint **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Retrieve all the constraint shader pointers belonging to the actor.
 
- Public Member Functions inherited from physx::PxActor
virtual PxActorType::Enum getType () const =0
 Retrieves the type of actor.
 
virtual PxScene * getScene () const =0
 Retrieves the scene which this actor belongs to.
 
virtual void setName (const char *name)=0
 Sets a name string for the object that can be retrieved with getName().
 
virtual const char * getName () const =0
 Retrieves the name string set with setName().
 
virtual PxBounds3 getWorldBounds (float inflation=1.01f) const =0
 Retrieves the axis aligned bounding box enclosing the actor.
 
virtual void setActorFlag (PxActorFlag::Enum flag, bool value)=0
 Raises or clears a particular actor flag.
 
virtual void setActorFlags (PxActorFlags inFlags)=0
 Sets the actor flags.
 
virtual PxActorFlags getActorFlags () const =0
 Reads the PxActor flags.
 
virtual void setDominanceGroup (PxDominanceGroup dominanceGroup)=0
 Assigns dynamic actors a dominance group identifier.
 
virtual PxDominanceGroup getDominanceGroup () const =0
 Retrieves the value set with setDominanceGroup().
 
virtual void setOwnerClient (PxClientID inClient)=0
 Sets the owner client of an actor.
 
virtual PxClientID getOwnerClient () const =0
 Returns the owner client that was specified at creation time.
 
virtual PxAggregate * getAggregate () const =0
 Retrieves the aggregate the actor might be a part of.
 
- 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.
 

Protected Member Functions

PX_INLINE PxArticulationLink (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxArticulationLink (PxBaseFlags baseFlags)
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance.
 
- Protected Member Functions inherited from physx::PxRigidBody
PX_INLINE PxRigidBody (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxRigidBody (PxBaseFlags baseFlags)
 
- Protected Member Functions inherited from physx::PxRigidActor
PX_INLINE PxRigidActor (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxRigidActor (PxBaseFlags baseFlags)
 
- Protected Member Functions inherited from physx::PxActor
PX_INLINE PxActor (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxActor (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
 

Additional Inherited Members

- Public Attributes inherited from physx::PxActor
void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object.
 
- Protected Attributes inherited from physx::PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 
PxU32 mBuiltInRefCount
 

Detailed Description

A component of an articulation that represents a rigid body.

Articulation links have a restricted subset of the functionality of a PxRigidDynamic:

  • They may not be kinematic, and do not support contact-force thresholds.
  • Their velocity or global pose cannot be set directly, but must be set via the articulation-root and joint positions/velocities.
  • Sleep state and solver iteration counts are properties of the entire articulation rather than the individual links.
See also
PxArticulationReducedCoordinate, PxArticulationReducedCoordinate::createLink, PxArticulationJointReducedCoordinate, PxRigidBody

Member Function Documentation

◆ getAngularVelocity()

virtual PxVec3 physx::PxArticulationLink::getAngularVelocity ( ) const
pure virtual

Get the angular velocity of the link.

Returns
The angular velocity of the link.
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.

Implements physx::PxRigidBody.

◆ getArticulation()

virtual PxArticulationReducedCoordinate & physx::PxArticulationLink::getArticulation ( ) const
pure virtual

Gets the articulation that the link is a part of.

Returns
The articulation.
See also
PxArticulationReducedCoordinate

◆ getCfmScale()

virtual PxReal physx::PxArticulationLink::getCfmScale ( ) const
pure virtual

Get the constraint-force-mixing scale term.

Returns
The constraint-force-mixing scale term.
See also
setCfmScale

◆ getChildren()

virtual PxU32 physx::PxArticulationLink::getChildren ( PxArticulationLink **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
pure virtual

Retrieves the child links.

Parameters
[out]userBufferThe buffer to receive articulation link pointers.
[in]bufferSizeThe size of the provided user buffer, use getNbChildren() for sizing.
[in]startIndexThe index of the first child pointer to be retrieved.
Returns
The number of articulation links written to the buffer.
See also
getNbChildren

◆ getConcreteTypeName()

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

Returns the string name of the dynamic type.

Returns
The string name.

Implements physx::PxBase.

◆ getInboundJoint()

virtual PxArticulationJointReducedCoordinate * physx::PxArticulationLink::getInboundJoint ( ) const
pure virtual

Gets the joint which connects this link to its parent.

Returns
The joint connecting the link to the parent. NULL for the root link.
See also
PxArticulationJointReducedCoordinate

◆ getInboundJointDof()

virtual PxU32 physx::PxArticulationLink::getInboundJointDof ( ) const
pure virtual

Gets the number of degrees of freedom of the joint which connects this link to its parent.

  • The root link DOF-count is defined to be 0 regardless of PxArticulationFlag::eFIX_BASE.
  • The return value is only valid for articulations that are in a scene.
Returns
The number of degrees of freedom, or 0xFFFFFFFF if the articulation is not in a scene.
See also
PxArticulationJointReducedCoordinate

◆ getLinearVelocity()

virtual PxVec3 physx::PxArticulationLink::getLinearVelocity ( ) const
pure virtual

Get the linear velocity of the link.

Returns
The linear velocity of the link.
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
PxRigidBody::getCMassLocalPose

Implements physx::PxRigidBody.

◆ getLinkIndex()

virtual PxU32 physx::PxArticulationLink::getLinkIndex ( ) const
pure virtual

Gets the low-level link index that may be used to index into members of PxArticulationCache.

The return value is only valid for articulations that are in a scene.

Returns
The low-level index, or 0xFFFFFFFF if the articulation is not in a scene.
See also
PxArticulationCache

◆ getNbChildren()

virtual PxU32 physx::PxArticulationLink::getNbChildren ( ) const
pure virtual

Gets the number of child links.

Returns
The number of child links.
See also
getChildren

◆ isKindOf()

virtual bool physx::PxArticulationLink::isKindOf ( const char *  superClass) const
inlineprotectedvirtual

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

Reimplemented from physx::PxRigidBody.

◆ release()

virtual void physx::PxArticulationLink::release ( )
pure virtual

Releases the link from the articulation.

Note
Only a leaf articulation link can be released.
Releasing a link is not allowed while the articulation link is in a scene. In order to release a link, remove and then re-add the corresponding articulation to the scene.
See also
PxArticulationReducedCoordinate::createLink()

Implements physx::PxRigidActor.

◆ setCfmScale()

virtual void physx::PxArticulationLink::setCfmScale ( const PxReal  cfm)
pure virtual

Set the constraint-force-mixing scale term.

The cfm scale term is a stabilization term that helps avoid instabilities with over-constrained configurations. It should be a small value that is multiplied by 1/mass internally to produce an additional bias added to the unit response term in the solver.

Parameters
[in]cfmThe constraint-force-mixing scale term.

Default: 0.025 Range: [0, 1]

Note
This call is not allowed while the simulation is running.
See also
getCfmScale

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