List of all members
PxRigidBody Class Referenceabstract

PxRigidBody is a base class shared between dynamic rigid body objects. More...

#include <PxRigidBody.h>

Inheritance diagram for PxRigidBody:
Inheritance graph
[legend]
Collaboration diagram for PxRigidBody:
Collaboration graph
[legend]

Public Member Functions

Mass Manipulation
virtual void setCMassLocalPose (const PxTransform &pose)=0
 Sets the pose of the center of mass relative to the actor. More...
 
virtual PxTransform getCMassLocalPose () const =0
 Retrieves the center of mass pose relative to the actor frame. More...
 
virtual void setMass (PxReal mass)=0
 Sets the mass of a dynamic actor. More...
 
virtual PxReal getMass () const =0
 Retrieves the mass of the actor. More...
 
virtual PxReal getInvMass () const =0
 Retrieves the inverse mass of the actor. More...
 
virtual void setMassSpaceInertiaTensor (const PxVec3 &m)=0
 Sets the inertia tensor, using a parameter specified in mass space coordinates. More...
 
virtual PxVec3 getMassSpaceInertiaTensor () const =0
 Retrieves the diagonal inertia tensor of the actor relative to the mass coordinate frame. More...
 
virtual PxVec3 getMassSpaceInvInertiaTensor () const =0
 Retrieves the diagonal inverse inertia tensor of the actor relative to the mass coordinate frame. More...
 
Velocity
virtual PxVec3 getLinearVelocity () const =0
 Retrieves the linear velocity of an actor. More...
 
virtual void setLinearVelocity (const PxVec3 &linVel, bool autowake=true)=0
 Sets the linear velocity of the actor. More...
 
virtual PxVec3 getAngularVelocity () const =0
 Retrieves the angular velocity of the actor. More...
 
virtual void setAngularVelocity (const PxVec3 &angVel, bool autowake=true)=0
 Sets the angular velocity of the actor. More...
 
- Public Member Functions inherited from PxRigidActor
virtual void release ()=0
 Deletes the rigid actor object. More...
 
virtual PxTransform getGlobalPose () const =0
 Retrieves the actors world space transform. More...
 
virtual void setGlobalPose (const PxTransform &pose, bool autowake=true)=0
 Method for setting an actor's pose in the world. More...
 
virtual PxShapecreateShape (const PxGeometry &geometry, PxMaterial *const *materials, PxU16 materialCount, PxShapeFlags shapeFlags=PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE)=0
 Creates a new shape with default properties and a list of materials and adds it to the list of shapes of this actor. More...
 
PX_DEPRECATED PX_INLINE PxShapecreateShape (const PxGeometry &geometry, PxMaterial *const *materials, PxU32 materialCount, const PxTransform &localPose)
 Deprecated function to create shapes with an initial transform. More...
 
PX_FORCE_INLINE PxShapecreateShape (const PxGeometry &geometry, const PxMaterial &material, PxShapeFlags shapeFlags=PxShapeFlag::eVISUALIZATION|PxShapeFlag::eSCENE_QUERY_SHAPE|PxShapeFlag::eSIMULATION_SHAPE)
 Creates a new shape with default properties and a single material adds it to the list of shapes of this actor. More...
 
PX_DEPRECATED PX_INLINE PxShapecreateShape (const PxGeometry &geometry, const PxMaterial &material, const PxTransform &localPose)
 Deprecated function to create shapes with an initial transform. More...
 
virtual void attachShape (PxShape &shape)=0
 
virtual void detachShape (PxShape &shape, bool wakeOnLostTouch=true)=0
 
virtual PxU32 getNbShapes () const =0
 Returns the number of shapes assigned to the actor. More...
 
virtual PxU32 getShapes (PxShape **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Retrieve all the shape pointers belonging to the actor. More...
 
virtual PxU32 getNbConstraints () const =0
 Returns the number of constraint shaders attached to the actor. More...
 
virtual PxU32 getConstraints (PxConstraint **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const =0
 Retrieve all the constraint shader pointers belonging to the actor. More...
 
- Public Member Functions inherited from PxActor
virtual PxActorType::Enum getType () const =0
 Retrieves the type of actor. More...
 
PX_DEPRECATED PX_INLINE
PxRigidStatic
isRigidStatic ()
 Attempts to cast to specific actor type. More...
 
PX_DEPRECATED PX_INLINE const
PxRigidStatic
isRigidStatic () const
 
PX_DEPRECATED PX_INLINE
PxRigidDynamic
isRigidDynamic ()
 
PX_DEPRECATED PX_INLINE const
PxRigidDynamic
isRigidDynamic () const
 
PX_DEPRECATED PX_INLINE
PxParticleSystem
isParticleSystem ()
 
PX_DEPRECATED PX_INLINE const
PxParticleSystem
isParticleSystem () const
 
PX_DEPRECATED PX_INLINE
PxParticleFluid
isParticleFluid ()
 
PX_DEPRECATED PX_INLINE const
PxParticleFluid
isParticleFluid () const
 
PX_DEPRECATED PX_INLINE
PxArticulationLink
isArticulationLink ()
 
PX_DEPRECATED PX_INLINE const
PxArticulationLink
isArticulationLink () const
 
PX_DEPRECATED PX_INLINE PxClothisCloth ()
 
PX_DEPRECATED PX_INLINE const
PxCloth
isCloth () const
 
PX_DEPRECATED PX_INLINE
PxRigidActor
isRigidActor ()
 
PX_DEPRECATED PX_INLINE const
PxRigidActor
isRigidActor () const
 
PX_DEPRECATED PX_INLINE
PxRigidBody
isRigidBody ()
 
PX_DEPRECATED PX_INLINE const
PxRigidBody
isRigidBody () const
 
PX_DEPRECATED PX_INLINE
PxParticleBase
isParticleBase ()
 
PX_DEPRECATED PX_INLINE const
PxParticleBase
isParticleBase () const
 
virtual PxScenegetScene () const =0
 Retrieves the scene which this actor belongs to. 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 actor. More...
 
virtual void setActorFlag (PxActorFlag::Enum flag, bool value)=0
 Raises or clears a particular actor flag. More...
 
virtual void setActorFlags (PxActorFlags inFlags)=0
 sets the actor flags More...
 
virtual PxActorFlags getActorFlags () const =0
 Reads the PxActor flags. More...
 
virtual void setDominanceGroup (PxDominanceGroup dominanceGroup)=0
 Assigns dynamic actors a dominance group identifier. More...
 
virtual PxDominanceGroup getDominanceGroup () const =0
 Retrieves the value set with setDominanceGroup(). More...
 
virtual void setOwnerClient (PxClientID inClient)=0
 Sets the owner client of an actor. More...
 
virtual PxClientID getOwnerClient () const =0
 Returns the owner client that was specified with at creation time. More...
 
virtual void setClientBehaviorFlags (PxActorClientBehaviorFlags)=0
 Sets the behavior bits of the actor. More...
 
virtual PxActorClientBehaviorFlags getClientBehaviorFlags () const =0
 Retrieves the behavior bits of the actor. More...
 
virtual PxAggregategetAggregate () const =0
 Retrieves the aggregate the actor might be a part of. More...
 
- Public Member Functions inherited from PxBase
virtual const char * getConcreteTypeName () const
 Returns string name of dynamic type. More...
 
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_INLINE PxType getConcreteType () const
 Returns concrete type of object. More...
 
PX_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag. More...
 
PX_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags. More...
 
PX_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags. More...
 
virtual bool isReleasable () const
 Whether the object is subordinate. More...
 

Forces

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. More...
 
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. More...
 
virtual void clearForce (PxForceMode::Enum mode=PxForceMode::eFORCE)=0
 Clears the accumulated forces (sets the accumulated force back to zero). More...
 
virtual void clearTorque (PxForceMode::Enum mode=PxForceMode::eFORCE)=0
 Clears the impulsive torque defined in the global coordinate frame to the actor. More...
 
virtual PX_DEPRECATED void setRigidDynamicFlag (PxRigidDynamicFlag::Enum flag, bool value)=0
 Raises or clears a particular dynamic rigid body flag. More...
 
virtual PX_DEPRECATED void setRigidDynamicFlags (PxRigidDynamicFlags inFlags)=0
 
virtual void setRigidBodyFlag (PxRigidBodyFlag::Enum flag, bool value)=0
 Raises or clears a particular rigid body flag. More...
 
virtual void setRigidBodyFlags (PxRigidBodyFlags inFlags)=0
 
virtual PX_DEPRECATED
PxRigidDynamicFlags 
getRigidDynamicFlags () const =0
 Reads the PxRigidBody flags. More...
 
virtual PxRigidBodyFlags getRigidBodyFlags () const =0
 Reads the PxRigidBody flags. More...
 
virtual void setMinCCDAdvanceCoefficient (PxReal advanceCoefficient)=0
 Sets the CCD minimum advance coefficient. More...
 
virtual PxReal getMinCCDAdvanceCoefficient () const =0
 Gets the CCD minimum advance coefficient. More...
 
virtual void setMaxDepenetrationVelocity (const 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. More...
 
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. More...
 
PX_INLINE PxRigidBody (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxRigidBody (PxBaseFlags baseFlags)
 
virtual ~PxRigidBody ()
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance. More...
 

Additional Inherited Members

- Public Attributes inherited from PxActor
void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object. More...
 
- Protected Member Functions inherited from PxRigidActor
PX_INLINE PxRigidActor (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxRigidActor (PxBaseFlags baseFlags)
 
virtual ~PxRigidActor ()
 
- Protected Member Functions inherited from PxActor
PX_INLINE PxActor (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxActor (PxBaseFlags baseFlags)
 
virtual ~PxActor ()
 
- Protected Attributes inherited from PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 

Detailed Description

PxRigidBody is a base class shared between dynamic rigid body objects.

See Also
PxRigidActor

Constructor & Destructor Documentation

PX_INLINE PxRigidBody::PxRigidBody ( PxType  concreteType,
PxBaseFlags  baseFlags 
)
inlineprotected
PX_INLINE PxRigidBody::PxRigidBody ( PxBaseFlags  baseFlags)
inlineprotected
virtual PxRigidBody::~PxRigidBody ( )
inlineprotectedvirtual

Member Function Documentation

virtual void PxRigidBody::addForce ( const PxVec3 force,
PxForceMode::Enum  mode = PxForceMode::eFORCE,
bool  autowake = true 
)
pure virtual

Applies a force (or impulse) defined in the global coordinate frame to the actor at its center of mass.

This will not induce a torque.

PxForceMode determines if the force is to be conventional or impulsive.

Each actor has an acceleration and a velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively. The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same accumulators and are just short hand for multiplying the vector parameter by inverse mass and then using PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively.

Note
It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
if this is called on an articulation link, only the link is updated, not the entire articulation.
see PxRigidBodyExt::computeVelocityDeltaFromImpulse for details of how to compute the change in linear velocity that will arise from the application of an impulsive force, where an impulsive force is applied force multiplied by a timestep.

Sleeping: This call wakes the actor if it is sleeping and the autowake parameter is true (default) or the force is non-zero.

Parameters
[in]forceForce/Impulse to apply defined in the global frame.
[in]modeThe mode to use when applying the force/impulse(see PxForceMode)
[in]autowakeSpecify if the call should wake up the actor if it is currently asleep. If true and the current wake counter value is smaller than PxSceneDesc::wakeCounterResetValue it will get increased to the reset value.
See Also
PxForceMode addTorque
virtual void PxRigidBody::addTorque ( const PxVec3 torque,
PxForceMode::Enum  mode = PxForceMode::eFORCE,
bool  autowake = true 
)
pure virtual

Applies an impulsive torque defined in the global coordinate frame to the actor.

PxForceMode determines if the torque is to be conventional or impulsive.

Each actor has an angular acceleration and an angular velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively. The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same accumulators and are just short hand for multiplying the vector parameter by inverse inertia and then using PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively.

Note
It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
if this called on an articulation link, only the link is updated, not the entire articulation.
see PxRigidBodyExt::computeVelocityDeltaFromImpulse for detatils of how to compute the change in angular velocity that will arise from the application of an impulsive torque, where an impulsive torque is an applied torque multiplied by a timestep.

Sleeping: This call wakes the actor if it is sleeping and the autowake parameter is true (default) or the torque is non-zero.

Parameters
[in]torqueTorque to apply defined in the global frame. Range: torque vector
[in]modeThe mode to use when applying the force/impulse(see PxForceMode).
[in]autowakewhether to wake up the object if it is asleep. If true and the current wake counter value is smaller than PxSceneDesc::wakeCounterResetValue it will get increased to the reset value.
See Also
PxForceMode addForce()
virtual void PxRigidBody::clearForce ( PxForceMode::Enum  mode = PxForceMode::eFORCE)
pure virtual

Clears the accumulated forces (sets the accumulated force back to zero).

Each actor has an acceleration and a velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively. The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same accumulators (see PxRigidBody::addForce() for details); therefore the effect of calling clearForce(PxForceMode::eFORCE) is equivalent to calling clearForce(PxForceMode::eACCELERATION), and the effect of calling clearForce(PxForceMode::eIMPULSE) is equivalent to calling clearForce(PxForceMode::eVELOCITY_CHANGE).

PxForceMode determines if the cleared force is to be conventional or impulsive.

Note
The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
Parameters
[in]modeThe mode to use when clearing the force/impulse(see PxForceMode)
See Also
PxForceMode addForce
virtual void PxRigidBody::clearTorque ( PxForceMode::Enum  mode = PxForceMode::eFORCE)
pure virtual

Clears the impulsive torque defined in the global coordinate frame to the actor.

PxForceMode determines if the cleared torque is to be conventional or impulsive.

Each actor has an angular acceleration and a velocity change accumulator which are directly modified using the modes PxForceMode::eACCELERATION and PxForceMode::eVELOCITY_CHANGE respectively. The modes PxForceMode::eFORCE and PxForceMode::eIMPULSE also modify these same accumulators (see PxRigidBody::addTorque() for details); therefore the effect of calling clearTorque(PxForceMode::eFORCE) is equivalent to calling clearTorque(PxForceMode::eACCELERATION), and the effect of calling clearTorque(PxForceMode::eIMPULSE) is equivalent to calling clearTorque(PxForceMode::eVELOCITY_CHANGE).

Note
The force modes PxForceMode::eIMPULSE and PxForceMode::eVELOCITY_CHANGE can not be applied to articulation links.
It is invalid to use this method if the actor has not been added to a scene already or if PxActorFlag::eDISABLE_SIMULATION is set.
Parameters
[in]modeThe mode to use when clearing the force/impulse(see PxForceMode).
See Also
PxForceMode addTorque
virtual PxVec3 PxRigidBody::getAngularVelocity ( ) const
pure virtual

Retrieves the angular velocity of the actor.

Returns
The angular velocity of the actor.
See Also
PxRigidDynamic.setAngularVelocity() getLinearVelocity()
virtual PxTransform PxRigidBody::getCMassLocalPose ( ) const
pure virtual

Retrieves the center of mass pose relative to the actor frame.

Returns
The center of mass pose relative to the actor frame.
See Also
setCMassLocalPose() PxRigidBodyDesc.massLocalPose
virtual PxReal PxRigidBody::getInvMass ( ) const
pure virtual

Retrieves the inverse mass of the actor.

Returns
The inverse mass of this actor.
See Also
setMass() PxRigidBodyDesc.mass setMassSpaceInertiaTensor()
virtual PxVec3 PxRigidBody::getLinearVelocity ( ) const
pure virtual

Retrieves the linear velocity of an actor.

Returns
The linear velocity of the actor.
See Also
PxRigidDynamic.setLinearVelocity() getAngularVelocity()
virtual PxReal PxRigidBody::getMass ( ) const
pure virtual

Retrieves the mass of the actor.

Note
A value of 0 is interpreted as infinite mass.
Returns
The mass of this actor.
See Also
setMass() PxRigidBodyDesc.mass setMassSpaceInertiaTensor()
virtual PxVec3 PxRigidBody::getMassSpaceInertiaTensor ( ) const
pure virtual

Retrieves the diagonal inertia tensor of the actor relative to the mass coordinate frame.

This method retrieves a mass frame inertia vector.

Returns
The mass space inertia tensor of this actor.
Note
A value of 0 in an element is interpreted as infinite inertia along that axis.
See Also
PxRigidBodyDesc.massSpaceInertia setMassSpaceInertiaTensor() setMass() setCMassLocalPose()
virtual PxVec3 PxRigidBody::getMassSpaceInvInertiaTensor ( ) const
pure virtual

Retrieves the diagonal inverse inertia tensor of the actor relative to the mass coordinate frame.

This method retrieves a mass frame inverse inertia vector.

Note
A value of 0 in an element is interpreted as infinite inertia along that axis.
Returns
The mass space inverse inertia tensor of this actor.
See Also
PxRigidBodyDesc.massSpaceInertia setMassSpaceInertiaTensor() setMass() setCMassLocalPose()
virtual PxReal PxRigidBody::getMaxDepenetrationVelocity ( ) const
pure virtual

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.

Returns
The maximum penetration bias applied by the solver.
virtual PxReal PxRigidBody::getMinCCDAdvanceCoefficient ( ) const
pure virtual

Gets the CCD minimum advance coefficient.

Returns
The value of the CCD min advance coefficient.
See Also
setMinCCDAdvanceCoefficient
virtual PxRigidBodyFlags PxRigidBody::getRigidBodyFlags ( ) const
pure virtual

Reads the PxRigidBody flags.

See the list of flags PxRigidBodyFlag

Returns
The values of the PxRigidBody flags.
See Also
PxRigidBodyFlag setRigidBodyFlag()
virtual PX_DEPRECATED PxRigidDynamicFlags PxRigidBody::getRigidDynamicFlags ( ) const
pure virtual

Reads the PxRigidBody flags.

Deprecated:

See the list of flags PxRigidBodyFlag

Returns
The values of the PxRigidBody flags.
See Also
PxRigidDynamicFlag setRigidDynamicFlag()
virtual bool PxRigidBody::isKindOf ( const char *  superClass) const
inlineprotectedvirtual

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

Reimplemented from PxRigidActor.

Reimplemented in PxRigidDynamic, and PxArticulationLink.

References PxRigidActor::isKindOf().

Referenced by PxArticulationLink::isKindOf(), and PxRigidDynamic::isKindOf().

virtual void PxRigidBody::setAngularVelocity ( const PxVec3 angVel,
bool  autowake = true 
)
pure virtual

Sets the angular velocity of the actor.

Note that if you continuously set the angular velocity of an actor yourself, forces such as friction will not be able to rotate the actor, because forces directly influence only the velocity/momentum.

Default: (0.0, 0.0, 0.0)

Sleeping: This call wakes the actor if it is sleeping, the autowake parameter is true (default) or the new velocity is non-zero

Note
It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.
Parameters
[in]angVelNew angular velocity of actor. Range: angular velocity vector
[in]autowakeWhether to wake the object up if it is asleep and the velocity is non-zero. If true and the current wake counter value is smaller than PxSceneDesc::wakeCounterResetValue it will get increased to the reset value.
See Also
getAngularVelocity() setLinearVelocity()
virtual void PxRigidBody::setCMassLocalPose ( const PxTransform pose)
pure virtual

Sets the pose of the center of mass relative to the actor.

Note
Changing this transform will not move the actor in the world!
Setting an unrealistic center of mass which is a long way from the body can make it difficult for the SDK to solve constraints. Perhaps leading to instability and jittering bodies.

Default: the identity transform

Parameters
[in]poseMass frame offset transform relative to the actor frame. Range: rigid body transform.
See Also
getCMassLocalPose() PxRigidBodyDesc.massLocalPose
virtual void PxRigidBody::setLinearVelocity ( const PxVec3 linVel,
bool  autowake = true 
)
pure virtual

Sets the linear velocity of the actor.

Note that if you continuously set the velocity of an actor yourself, forces such as gravity or friction will not be able to manifest themselves, because forces directly influence only the velocity/momentum of an actor.

Default: (0.0, 0.0, 0.0)

Sleeping: This call wakes the actor if it is sleeping, the autowake parameter is true (default) or the new velocity is non-zero

Note
It is invalid to use this method if PxActorFlag::eDISABLE_SIMULATION is set.
Parameters
[in]linVelNew linear velocity of actor. Range: velocity vector
[in]autowakeWhether to wake the object up if it is asleep and the velocity is non-zero. If true and the current wake counter value is smaller than PxSceneDesc::wakeCounterResetValue it will get increased to the reset value.
See Also
getLinearVelocity() setAngularVelocity()
virtual void PxRigidBody::setMass ( PxReal  mass)
pure virtual

Sets the mass of a dynamic actor.

The mass must be non-negative.

setMass() does not update the inertial properties of the body, to change the inertia tensor use setMassSpaceInertiaTensor() or the PhysX extensions method PxRigidBodyExt::updateMassAndInertia().

Note
A value of 0 is interpreted as infinite mass.
Values of 0 are not permitted for instances of PxArticulationLink but are permitted for instances of PxRigidDynamic.

Default: 1.0

Sleeping: Does NOT wake the actor up automatically.

Parameters
[in]massNew mass value for the actor. Range: [0, PX_MAX_F32)
See Also
getMass() PxRigidBodyDesc.mass setMassSpaceInertiaTensor()
virtual void PxRigidBody::setMassSpaceInertiaTensor ( const PxVec3 m)
pure virtual

Sets the inertia tensor, using a parameter specified in mass space coordinates.

Note that such matrices are diagonal – the passed vector is the diagonal.

If you have a non diagonal world/actor space inertia tensor(3x3 matrix). Then you need to diagonalize it and set an appropriate mass space transform. See setCMassLocalPose().

The inertia tensor elements must be non-negative.

Note
A value of 0 in an element is interpreted as infinite inertia along that axis.
Values of 0 are not permitted for instances of PxArticulationLink but are permitted for instances of PxRigidDynamic.

Default: (1.0, 1.0, 1.0)

Sleeping: Does NOT wake the actor up automatically.

Parameters
[in]mNew mass space inertia tensor for the actor.
See Also
PxRigidBodyDesc.massSpaceInertia getMassSpaceInertia() setMass() setCMassLocalPose()
virtual void PxRigidBody::setMaxDepenetrationVelocity ( const PxReal  biasClamp)
pure virtual

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.

Parameters
[in]biasClampThe maximum velocity to de-penetrate by Range: (0, PX_MAX_F32].
virtual void PxRigidBody::setMinCCDAdvanceCoefficient ( PxReal  advanceCoefficient)
pure virtual

Sets the CCD minimum advance coefficient.

The CCD minimum advance coefficient is a value in the range [0, 1] that is used to control the minimum amount of time a body is integrated when it has a CCD contact. The actual minimum amount of time that is integrated depends on various properties, including the relative speed and collision shapes of the bodies involved in the contact. From these properties, a numeric value is calculated that determines the maximum distance (and therefore maximum time) which these bodies could be integrated forwards that would ensure that these bodies did not pass through each-other. This value is then scaled by CCD minimum advance coefficient to determine the amount of time that will be consumed in the CCD pass.

Things to consider: A large value (approaching 1) ensures that the objects will always advance some time. However, larger values increase the chances of objects gently drifting through each-other in scenes which the constraint solver can't converge, e.g. scenes where an object is being dragged through a wall with a constraint. A value of 0 ensures that the pair of objects stop at the exact time-of-impact and will not gently drift through each-other. However, with very small/thin objects initially in contact, this can lead to a large amount of time being dropped and increases the chances of jamming. Jamming occurs when the an object is persistently in contact with an object such that the time-of-impact is 0, which results in no time being advanced for those objects in that CCD pass.

The chances of jamming can be reduced by increasing the number of CCD mass

See Also
PxSceneDesc.ccdMaxPasses. However, increasing this number increases the CCD overhead.
Parameters
[in]advanceCoefficientThe CCD min advance coefficient. Range: [0, 1] Default: 0.15
virtual void PxRigidBody::setRigidBodyFlag ( PxRigidBodyFlag::Enum  flag,
bool  value 
)
pure virtual

Raises or clears a particular rigid body flag.

See the list of flags PxRigidBodyFlag

Default: no flags are set

Sleeping: Does NOT wake the actor up automatically.

Parameters
[in]flagThe PxRigidBody flag to raise(set) or clear. See PxRigidBodyFlag.
[in]valueThe new boolean value for the flag.
See Also
PxRigidBodyFlag getRigidBodyFlags()
virtual void PxRigidBody::setRigidBodyFlags ( PxRigidBodyFlags  inFlags)
pure virtual
virtual PX_DEPRECATED void PxRigidBody::setRigidDynamicFlag ( PxRigidDynamicFlag::Enum  flag,
bool  value 
)
pure virtual

Raises or clears a particular dynamic rigid body flag.

Deprecated:

See the list of flags PxRigidBodyFlag

Default: no flags are set

Sleeping: Does NOT wake the actor up automatically.

Parameters
[in]flagThe PxRigidDynamic flag to raise(set) or clear. See PxRigidDynamicFlag PxRigidBodyFlag.
[in]valueThe new boolean value for the flag.
See Also
PxRigidDynamicFlag getRigidDynamicFlags()
virtual PX_DEPRECATED void PxRigidBody::setRigidDynamicFlags ( PxRigidDynamicFlags  inFlags)
pure virtual

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


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