PxRigidDynamic Class Reference
[Physics]
PxRigidDynamic represents a dynamic rigid simulation object in the physics SDK.
More...
#include <PxRigidDynamic.h>


Public Member Functions | |
Kinematic Actors | |
virtual void | setKinematicTarget (const PxTransform &destination)=0 |
Moves kinematically controlled dynamic actors through the game world. | |
Damping | |
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. | |
Velocity | |
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. | |
Sleeping | |
virtual bool | isSleeping () const =0 |
Returns true if this body is sleeping. | |
virtual void | setSleepThreshold (PxReal threshold)=0 |
Sets the mass-normalized kinetic energy threshold below which an actor may go to sleep. | |
virtual PxReal | getSleepThreshold () const =0 |
Returns the mass-normalized kinetic energy below which an actor may go to sleep. | |
virtual void | wakeUp (PxReal wakeCounterValue=PX_SLEEP_INTERVAL)=0 |
Wakes up the actor if it is sleeping. | |
virtual void | putToSleep ()=0 |
Forces the actor to sleep. | |
virtual void | setSolverIterationCounts (PxU32 minPositionIters, PxU32 minVelocityIters=1)=0 |
Sets the solver iteration counts for the body. | |
virtual void | getSolverIterationCounts (PxU32 &minPositionIters, PxU32 &minVelocityIters) const =0 |
Retrieves the solver iteration counts. | |
virtual PxReal | getContactReportThreshold () const =0 |
Retrieves the force threshold for contact reports. | |
virtual void | setContactReportThreshold (PxReal threshold)=0 |
Sets the force threshold for contact reports. | |
virtual void | setRigidDynamicFlag (PxRigidDynamicFlag::Enum flag, bool value)=0 |
Raises or clears a particular dynamic rigid body flag. | |
virtual void | setRigidDynamicFlags (PxRigidDynamicFlags inFlags)=0 |
virtual PxRigidDynamicFlags | getRigidDynamicFlags () const =0 |
Reads the PxRigidDynamic flags. | |
virtual const char * | getConcreteTypeName () const |
returns string name of dynamic type. | |
PxRigidDynamic (PxRefResolver &v) | |
PX_INLINE | PxRigidDynamic () |
virtual | ~PxRigidDynamic () |
virtual bool | isKindOf (const char *name) const |
Detailed Description
PxRigidDynamic represents a dynamic rigid simulation object in the physics SDK.
Creation
Instances of this class are created by calling PxPhysics::createRigidDynamic() and deleted with release().
Visualizations
- PxVisualizationParameter::eACTOR_AXES
- PxVisualizationParameter::eBODY_AXES
- PxVisualizationParameter::eBODY_MASS_AXES
- PxVisualizationParameter::eBODY_LIN_VELOCITY
- PxVisualizationParameter::eBODY_ANG_VELOCITY
- PxVisualizationParameter::eBODY_JOINT_GROUPS
Constructor & Destructor Documentation
PxRigidDynamic::PxRigidDynamic | ( | PxRefResolver & | v | ) | [inline, protected] |
PX_INLINE PxRigidDynamic::PxRigidDynamic | ( | ) | [inline, protected] |
virtual PxRigidDynamic::~PxRigidDynamic | ( | ) | [inline, protected, virtual] |
Member Function Documentation
virtual PxReal PxRigidDynamic::getAngularDamping | ( | ) | const [pure virtual] |
Retrieves the angular damping coefficient.
- Returns:
- The angular damping coefficient associated with this actor.
- See also:
- setAngularDamping() getLinearDamping()
virtual const char* PxRigidDynamic::getConcreteTypeName | ( | ) | const [inline, virtual] |
returns string name of dynamic type.
- Returns:
- class name of most derived type of this object.
Reimplemented from PxSerializable.
virtual PxReal PxRigidDynamic::getContactReportThreshold | ( | ) | const [pure virtual] |
Retrieves the force threshold for contact reports.
The contact report threshold is a force threshold. If the force between two actors exceeds this threshold for either of the two actors, a contact report will be generated according to the contact report threshold flags provided by the filter shader/callback. See PxPairFlag.
The threshold used for a collision between a dynamic actor and the static environment is the threshold of the dynamic actor, and all contacts with static actors are summed to find the total normal force.
Default: PX_MAX_F32
- Returns:
- Force threshold for contact reports.
virtual PxReal PxRigidDynamic::getLinearDamping | ( | ) | const [pure virtual] |
Retrieves the linear damping coefficient.
- Returns:
- The linear damping coefficient associated with this actor.
- See also:
- setLinearDamping() getAngularDamping()
virtual PxReal PxRigidDynamic::getMaxAngularVelocity | ( | ) | const [pure virtual] |
Retrieves the maximum angular velocity permitted for this actor.
- Returns:
- The maximum allowed angular velocity for this actor.
- See also:
- setMaxAngularVelocity
virtual PxRigidDynamicFlags PxRigidDynamic::getRigidDynamicFlags | ( | ) | const [pure virtual] |
Reads the PxRigidDynamic flags.
See the list of flags PxRigidDynamicFlag
- Returns:
- The values of the PxRigidDynamic flags.
- See also:
- PxRigidDynamicFlag setRigidDynamicFlag()
virtual PxReal PxRigidDynamic::getSleepThreshold | ( | ) | const [pure virtual] |
Returns the mass-normalized kinetic energy below which an actor may go to sleep.
Actors whose kinetic energy divided by their mass is above this threshold will not be put to sleep.
- Returns:
- The energy threshold for sleeping.
virtual bool PxRigidDynamic::isKindOf | ( | const char * | name | ) | const [inline, protected, virtual] |
virtual bool PxRigidDynamic::isSleeping | ( | ) | const [pure virtual] |
Returns true if this body is sleeping.
When an actor does not move for a period of time, it is no longer simulated in order to save time. This state is called sleeping. However, because the object automatically wakes up when it is either touched by an awake object, or one of its properties is changed by the user, the entire sleep mechanism should be transparent to the user.
If an actor is asleep after the call to PxScene::fetchResults() returns, it is guaranteed that the pose of the actor was not changed. You can use this information to avoid updating the transforms of associated of dependent objects.
- Returns:
- True if the actor is sleeping.
virtual void PxRigidDynamic::putToSleep | ( | ) | [pure virtual] |
Forces the actor to sleep.
The actor will stay asleep during the next simulation step if not touched by another non-sleeping actor.
- Note:
- This will set the velocity of the actor to 0.
- See also:
- isSleeping() wakeUp()
virtual void PxRigidDynamic::setAngularDamping | ( | PxReal | angDamp | ) | [pure virtual] |
Sets the angular damping coefficient.
Zero represents no damping.
The angular damping coefficient must be nonnegative.
Default: 0.05
- Parameters:
-
[in] angDamp Angular damping coefficient. Range: [0,inf)
- See also:
- getAngularDamping() setLinearDamping()
virtual void PxRigidDynamic::setContactReportThreshold | ( | PxReal | threshold | ) | [pure virtual] |
Sets the force threshold for contact reports.
See getContactReportThreshold().
- Parameters:
-
[in] threshold Force threshold for contact reports. Range: (0,inf)
- See also:
- getContactReportThreshold PxPairFlag
virtual void PxRigidDynamic::setKinematicTarget | ( | const PxTransform & | destination | ) | [pure virtual] |
Moves kinematically controlled dynamic actors through the game world.
You set a dynamic actor to be kinematic using the PxRigidDynamicFlag::eKINEMATIC flag, used either in the PxRigidDynamicDesc or with setRigidDynamicFlag().
The move command will result in a velocity that will move the body into the desired pose. After the move is carried out during a single time step, the velocity is returned to zero. Thus, you must continuously call this in every time step for kinematic actors so that they move along a path.
This function simply stores the move destination until the next simulation step is processed, so consecutive calls will simply overwrite the stored target variable.
The motion is always fully carried out.
Sleeping: This call wakes the actor if it is sleeping.
- Parameters:
-
[in] destination The desired pose for the kinematic actor, in the global frame. Range: rigid body transform.
- See also:
- PxRigidDynamicFlag setRigidDynamicFlag()
virtual void PxRigidDynamic::setLinearDamping | ( | PxReal | linDamp | ) | [pure virtual] |
Sets the linear damping coefficient.
Zero represents no damping. The damping coefficient must be nonnegative.
Default: 0.0
- Parameters:
-
[in] linDamp Linear damping coefficient. Range: [0,inf)
- See also:
- getLinearDamping() setAngularDamping()
virtual void PxRigidDynamic::setMaxAngularVelocity | ( | PxReal | maxAngVel | ) | [pure virtual] |
Lets you set the maximum angular velocity permitted for this actor.
For various internal computations, very quickly rotating actors introduce error into the simulation, which leads to undesired results.
With this function, you can set the maximum angular velocity permitted for this rigid body. Higher angular velocities are clamped to this value.
Note: The angular velocity is clamped to the set value before the solver, which means that the limit may still be momentarily exceeded.
Default: 7.0
- Parameters:
-
[in] maxAngVel Max allowable angular velocity for actor. Range: (0,inf)
- See also:
- getMaxAngularVelocity()
virtual void PxRigidDynamic::setRigidDynamicFlag | ( | PxRigidDynamicFlag::Enum | flag, | |
bool | value | |||
) | [pure virtual] |
Raises or clears a particular dynamic rigid body flag.
See the list of flags PxRigidDynamicFlag
Default: no flags are set
Sleeping: Does NOT wake the actor up automatically.
- Parameters:
-
[in] flag The PxRigidDynamic flag to raise(set) or clear. See PxRigidDynamicFlag. [in] value The new boolean value for the flag.
- See also:
- PxRigidDynamicFlag getRigidDynamicFlags()
virtual void PxRigidDynamic::setRigidDynamicFlags | ( | PxRigidDynamicFlags | inFlags | ) | [pure virtual] |
virtual void PxRigidDynamic::setSleepThreshold | ( | PxReal | threshold | ) | [pure virtual] |
Sets the mass-normalized kinetic energy threshold below which an actor may go to sleep.
Actors whose kinetic energy divided by their mass is above this threshold will not be put to sleep.
Default: 0.05 * PxTolerancesScale::speed * PxTolerancesScale::speed
- Parameters:
-
[in] threshold Energy below which an actor may go to sleep. Range: (0,inf]
virtual void PxRigidDynamic::setSolverIterationCounts | ( | PxU32 | minPositionIters, | |
PxU32 | minVelocityIters = 1 | |||
) | [pure virtual] |
Sets the solver iteration counts for the body.
The solver iteration count determines how accurately joints and contacts are resolved. If you are having trouble with jointed bodies oscillating and behaving erratically, then setting a higher position iteration count may improve their stability.
If intersecting bodies are being depenetrated too violently, increase the number of velocity iterations.
Default: 4 position iterations, 1 velocity iteration
- Parameters:
-
[in] minPositionIters Number of position iterations the solver should perform for this body. Range: [1,255] [in] minVelocityIters Number of velocity iterations the solver should perform for this body. Range: [1,255]
- See also:
- getSolverIterationCounts()
virtual void PxRigidDynamic::wakeUp | ( | PxReal | wakeCounterValue = PX_SLEEP_INTERVAL |
) | [pure virtual] |
Wakes up the actor if it is sleeping.
The wakeCounterValue determines how long until the body is put to sleep, a value of zero means that the body is sleeping. wakeUp(0) is equivalent to PxRigidDynamic::putToSleep().
- Parameters:
-
[in] wakeCounterValue New sleep counter value. Range: [0,inf]
- See also:
- isSleeping() putToSleep()
The documentation for this class was generated from the following file:
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com