Bullet Collision Detection & Physics Library: btDiscreteDynamicsWorld Class Reference

Bullet Collision Detection & Physics Library

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
btDiscreteDynamicsWorld Class Reference

btDiscreteDynamicsWorld provides discrete rigid body simulation those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController More...

`#include <btDiscreteDynamicsWorld.h>`

Inheritance diagram for btDiscreteDynamicsWorld:
[legend]
Collaboration diagram for btDiscreteDynamicsWorld:
[legend]

## Public Member Functions
| BT_DECLARE_ALIGNED_ALLOCATOR ()
| btDiscreteDynamicsWorld (btDispatcher *dispatcher, btBroadphaseInterface *pairCache, btConstraintSolver *constraintSolver, btCollisionConfiguration *collisionConfiguration)
| this btDiscreteDynamicsWorld constructor gets created objects from the user, and will not delete those More...
virtual | ~btDiscreteDynamicsWorld ()
virtual int | stepSimulation (btScalar timeStep, int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.))
| if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's More...
virtual void | solveConstraints (btContactSolverInfo &solverInfo)
virtual void | synchronizeMotionStates ()
void | synchronizeSingleMotionState (btRigidBody *body)
| this can be useful to synchronize a single rigid body -> graphics object More...
virtual void | addConstraint (btTypedConstraint *constraint, bool disableCollisionsBetweenLinkedBodies=false)
virtual void | removeConstraint (btTypedConstraint *constraint)
virtual void | addAction (btActionInterface *)
virtual void | removeAction (btActionInterface *)
btSimulationIslandManager * | getSimulationIslandManager ()
const btSimulationIslandManager * | getSimulationIslandManager () const
btCollisionWorld * | getCollisionWorld ()
virtual void | setGravity (const btVector3 &gravity)
virtual btVector3 | getGravity () const
virtual void | addCollisionObject (btCollisionObject *collisionObject, int collisionFilterGroup=btBroadphaseProxy::StaticFilter, int collisionFilterMask=btBroadphaseProxy::AllFilter ^ btBroadphaseProxy::StaticFilter)
virtual void | addRigidBody (btRigidBody *body)
virtual void | addRigidBody (btRigidBody *body, int group, int mask)
virtual void | removeRigidBody (btRigidBody *body)
virtual void | removeCollisionObject (btCollisionObject *collisionObject)
| removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btCollisionWorld::removeCollisionObject More...
virtual void | debugDrawConstraint (btTypedConstraint *constraint)
virtual void | debugDrawWorld ()
virtual void | setConstraintSolver (btConstraintSolver *solver)
virtual btConstraintSolver * | getConstraintSolver ()
virtual int | getNumConstraints () const
virtual btTypedConstraint * | getConstraint (int index)
virtual const btTypedConstraint * | getConstraint (int index) const
virtual btDynamicsWorldType | getWorldType () const
virtual void | clearForces ()
| the forces on each rigidbody is accumulating together with gravity. clear this after each timestep. More...
virtual void | applyGravity ()
| apply gravity, call this once per timestep More...
virtual void | setNumTasks (int numTasks)
virtual void | updateVehicles (btScalar timeStep)
| obsolete, use updateActions instead More...
virtual void | addVehicle (btActionInterface *vehicle)
| obsolete, use addAction instead More...
virtual void | removeVehicle (btActionInterface *vehicle)
| obsolete, use removeAction instead More...
virtual void | addCharacter (btActionInterface *character)
| obsolete, use addAction instead More...
virtual void | removeCharacter (btActionInterface *character)
| obsolete, use removeAction instead More...
void | setSynchronizeAllMotionStates (bool synchronizeAll)
bool | getSynchronizeAllMotionStates () const
void | setApplySpeculativeContactRestitution (bool enable)
bool | getApplySpeculativeContactRestitution () const
virtual void | serialize (btSerializer *serializer)
| Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (see Bullet/Demos/SerializeDemo) More...
void | setLatencyMotionStateInterpolation (bool latencyInterpolation)
| Interpolate motion state between previous and current transform, instead of current and next transform. More...
bool | getLatencyMotionStateInterpolation () const
btAlignedObjectArray< btRigidBody * > & | getNonStaticRigidBodies ()
const btAlignedObjectArray< btRigidBody * > & | getNonStaticRigidBodies () const
Public Member Functions inherited from btDynamicsWorld
| btDynamicsWorld (btDispatcher *dispatcher, btBroadphaseInterface *broadphase, btCollisionConfiguration *collisionConfiguration)
virtual | ~btDynamicsWorld ()
void | setInternalTickCallback (btInternalTickCallback cb, void *worldUserInfo=0, bool isPreTick=false)
| Set the callback for when an internal tick (simulation substep) happens, optional user info. More...
void | setWorldUserInfo (void *worldUserInfo)
void * | getWorldUserInfo () const
btContactSolverInfo & | getSolverInfo ()
const btContactSolverInfo & | getSolverInfo () const
Public Member Functions inherited from btCollisionWorld
| btCollisionWorld (btDispatcher *dispatcher, btBroadphaseInterface *broadphasePairCache, btCollisionConfiguration *collisionConfiguration)
| for debug drawing More...
virtual | ~btCollisionWorld ()
void | setBroadphase (btBroadphaseInterface *pairCache)
const btBroadphaseInterface * | getBroadphase () const
btBroadphaseInterface * | getBroadphase ()
btOverlappingPairCache * | getPairCache ()
btDispatcher * | getDispatcher ()
const btDispatcher * | getDispatcher () const
void | updateSingleAabb (btCollisionObject *colObj)
virtual void | updateAabbs ()
virtual void | computeOverlappingPairs ()
| the computeOverlappingPairs is usually already called by performDiscreteCollisionDetection (or stepSimulation) it can be useful to use if you perform ray tests without collision detection/simulation More...
virtual void | setDebugDrawer (btIDebugDraw *debugDrawer)
virtual btIDebugDraw * | getDebugDrawer ()
virtual void | debugDrawObject (const btTransform &worldTransform, const btCollisionShape *shape, const btVector3 &color)
int | getNumCollisionObjects () const
virtual void | rayTest (const btVector3 &rayFromWorld, const btVector3 &rayToWorld, RayResultCallback &resultCallback) const
| rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback This allows for several queries: first hit, all hits, any hit, dependent on the value returned by the callback. More...
void | convexSweepTest (const btConvexShape *castShape, const btTransform &from, const btTransform &to, ConvexResultCallback &resultCallback, btScalar allowedCcdPenetration=btScalar(0.)) const
| convexTest performs a swept convex cast on all objects in the btCollisionWorld, and calls the resultCallback This allows for several queries: first hit, all hits, any hit, dependent on the value return by the callback. More...
void | contactTest (btCollisionObject *colObj, ContactResultCallback &resultCallback)
| contactTest performs a discrete collision test between colObj against all objects in the btCollisionWorld, and calls the resultCallback. More...
void | contactPairTest (btCollisionObject *colObjA, btCollisionObject *colObjB, ContactResultCallback &resultCallback)
| contactTest performs a discrete collision test between two collision objects and calls the resultCallback if overlap if detected. More...
virtual void | refreshBroadphaseProxy (btCollisionObject *collisionObject)
btCollisionObjectArray & | getCollisionObjectArray ()
const btCollisionObjectArray & | getCollisionObjectArray () const
virtual void | performDiscreteCollisionDetection ()
btDispatcherInfo & | getDispatchInfo ()
const btDispatcherInfo & | getDispatchInfo () const
bool | getForceUpdateAllAabbs () const
void | setForceUpdateAllAabbs (bool forceUpdateAllAabbs)

## Protected Member Functions
virtual void | predictUnconstraintMotion (btScalar timeStep)
void | integrateTransformsInternal (btRigidBody **bodies, int numBodies, btScalar timeStep)
virtual void | integrateTransforms (btScalar timeStep)
virtual void | calculateSimulationIslands ()
virtual void | updateActivationState (btScalar timeStep)
void | updateActions (btScalar timeStep)
void | startProfiling (btScalar timeStep)
virtual void | internalSingleStepSimulation (btScalar timeStep)
void | releasePredictiveContacts ()
void | createPredictiveContactsInternal (btRigidBody **bodies, int numBodies, btScalar timeStep)
virtual void | createPredictiveContacts (btScalar timeStep)
virtual void | saveKinematicState (btScalar timeStep)
void | serializeRigidBodies (btSerializer *serializer)
void | serializeDynamicsWorldInfo (btSerializer *serializer)
Protected Member Functions inherited from btCollisionWorld
void | serializeCollisionObjects (btSerializer *serializer)
void | serializeContactManifolds (btSerializer *serializer)

## Protected Attributes
btAlignedObjectArray< btTypedConstraint * > | m_sortedConstraints
InplaceSolverIslandCallback * | m_solverIslandCallback
btConstraintSolver * | m_constraintSolver
btSimulationIslandManager * | m_islandManager
btAlignedObjectArray< btTypedConstraint * > | m_constraints
btAlignedObjectArray< btRigidBody * > | m_nonStaticRigidBodies
btVector3 | m_gravity
btScalar | m_localTime
btScalar | m_fixedTimeStep
bool | m_ownsIslandManager
bool | m_ownsConstraintSolver
bool | m_synchronizeAllMotionStates
bool | m_applySpeculativeContactRestitution
btAlignedObjectArray< btActionInterface * > | m_actions
int | m_profileTimings
bool | m_latencyMotionStateInterpolation
btAlignedObjectArray< btPersistentManifold * > | m_predictiveManifolds
btSpinMutex | m_predictiveManifoldsMutex
Protected Attributes inherited from btDynamicsWorld
btInternalTickCallback | m_internalTickCallback
btInternalTickCallback | m_internalPreTickCallback
void * | m_worldUserInfo
btContactSolverInfo | m_solverInfo
Protected Attributes inherited from btCollisionWorld
btAlignedObjectArray< btCollisionObject * > | m_collisionObjects
btDispatcher * | m_dispatcher1
btDispatcherInfo | m_dispatchInfo
btBroadphaseInterface * | m_broadphasePairCache
btIDebugDraw * | m_debugDrawer
bool | m_forceUpdateAllAabbs
| m_forceUpdateAllAabbs can be set to false as an optimization to only update active object AABBs it is true by default, because it is error-prone (setting the position of static objects wouldn't update their AABB) More...

## Additional Inherited Members
Static Public Member Functions inherited from btCollisionWorld
static void | rayTestSingle (const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, RayResultCallback &resultCallback)
| rayTestSingle performs a raycast call and calls the resultCallback. More...
static void | rayTestSingleInternal (const btTransform &rayFromTrans, const btTransform &rayToTrans, const btCollisionObjectWrapper *collisionObjectWrap, RayResultCallback &resultCallback)
static void | objectQuerySingle (const btConvexShape *castShape, const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, ConvexResultCallback &resultCallback, btScalar allowedPenetration)
| objectQuerySingle performs a collision detection query and calls the resultCallback. It is used internally by rayTest. More...
static void | objectQuerySingleInternal (const btConvexShape *castShape, const btTransform &convexFromTrans, const btTransform &convexToTrans, const btCollisionObjectWrapper *colObjWrap, ConvexResultCallback &resultCallback, btScalar allowedPenetration)

## Detailed Description

btDiscreteDynamicsWorld provides discrete rigid body simulation those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController

Definition at line 36 of file btDiscreteDynamicsWorld.h.

## Constructor & Destructor Documentation

## ◆ btDiscreteDynamicsWorld()

btDiscreteDynamicsWorld::btDiscreteDynamicsWorld | ( | btDispatcher * | dispatcher,
|  | btBroadphaseInterface * | pairCache,
|  | btConstraintSolver * | constraintSolver,
|  | btCollisionConfiguration * | collisionConfiguration
| ) |  |

this btDiscreteDynamicsWorld constructor gets created objects from the user, and will not delete those

Definition at line 191 of file btDiscreteDynamicsWorld.cpp.

## ◆ ~btDiscreteDynamicsWorld()

btDiscreteDynamicsWorld::~btDiscreteDynamicsWorld | ( |  | ) |
| virtual

Definition at line 229 of file btDiscreteDynamicsWorld.cpp.

## Member Function Documentation

## ◆ addAction()

void btDiscreteDynamicsWorld::addAction | ( | btActionInterface * | action | ) |
| virtual

Implements btDynamicsWorld.

Definition at line 651 of file btDiscreteDynamicsWorld.cpp.

## ◆ addCharacter()

void btDiscreteDynamicsWorld::addCharacter | ( | btActionInterface * | character | ) |
| virtual

obsolete, use addAction instead

Reimplemented from btDynamicsWorld.

Definition at line 671 of file btDiscreteDynamicsWorld.cpp.

## ◆ addCollisionObject()

void btDiscreteDynamicsWorld::addCollisionObject | ( | btCollisionObject * | collisionObject,
|  | int | collisionFilterGroup = `btBroadphaseProxy::StaticFilter`,
|  | int | collisionFilterMask = `btBroadphaseProxy::AllFilter ^ btBroadphaseProxy::StaticFilter`
| ) |  |
| virtual

Reimplemented from btCollisionWorld.

Definition at line 517 of file btDiscreteDynamicsWorld.cpp.

## ◆ addConstraint()

void btDiscreteDynamicsWorld::addConstraint | ( | btTypedConstraint * | constraint,
|  | bool | disableCollisionsBetweenLinkedBodies = `false`
| ) |  |
| virtual

Reimplemented from btDynamicsWorld.

Definition at line 631 of file btDiscreteDynamicsWorld.cpp.

## ◆ addRigidBody() [1/2]

void btDiscreteDynamicsWorld::addRigidBody | ( | btRigidBody * | body | ) |
| virtual

Implements btDynamicsWorld.

Definition at line 537 of file btDiscreteDynamicsWorld.cpp.

## ◆ addRigidBody() [2/2]

void btDiscreteDynamicsWorld::addRigidBody | ( | btRigidBody * | body,
|  | int | group,
|  | int | mask
| ) |  |
| virtual

Implements btDynamicsWorld.

Definition at line 563 of file btDiscreteDynamicsWorld.cpp.

## ◆ addVehicle()

void btDiscreteDynamicsWorld::addVehicle | ( | btActionInterface * | vehicle | ) |
| virtual

obsolete, use addAction instead

Reimplemented from btDynamicsWorld.

Definition at line 661 of file btDiscreteDynamicsWorld.cpp.

## ◆ applyGravity()

void btDiscreteDynamicsWorld::applyGravity | ( |  | ) |
| virtual

apply gravity, call this once per timestep

Reimplemented in btMultiBodyDynamicsWorld.

Definition at line 322 of file btDiscreteDynamicsWorld.cpp.

## ◆ BT_DECLARE_ALIGNED_ALLOCATOR()

btDiscreteDynamicsWorld::BT_DECLARE_ALIGNED_ALLOCATOR | ( |  | ) |

## ◆ calculateSimulationIslands()

void btDiscreteDynamicsWorld::calculateSimulationIslands | ( |  | ) |
| protectedvirtual

Reimplemented in btMultiBodyDynamicsWorld.

Definition at line 709 of file btDiscreteDynamicsWorld.cpp.

## ◆ clearForces()

void btDiscreteDynamicsWorld::clearForces | ( |  | ) |
| virtual

the forces on each rigidbody is accumulating together with gravity. clear this after each timestep.

Implements btDynamicsWorld.

Reimplemented in btMultiBodyDynamicsWorld.

Definition at line 309 of file btDiscreteDynamicsWorld.cpp.

## ◆ createPredictiveContacts()

void btDiscreteDynamicsWorld::createPredictiveContacts | ( | btScalar | timeStep | ) |
| protectedvirtual

Reimplemented in btDiscreteDynamicsWorldMt.

Definition at line 941 of file btDiscreteDynamicsWorld.cpp.

## ◆ createPredictiveContactsInternal()

void btDiscreteDynamicsWorld::createPredictiveContactsInternal | ( | btRigidBody ** | bodies,
|  | int | numBodies,
|  | btScalar | timeStep
| ) |  |
| protected

Definition at line 849 of file btDiscreteDynamicsWorld.cpp.

## ◆ debugDrawConstraint()

void btDiscreteDynamicsWorld::debugDrawConstraint | ( | btTypedConstraint * | constraint | ) |
| virtual

note: the code for D6_SPRING_2_CONSTRAINT_TYPE is identical to D6_CONSTRAINT_TYPE, the D6_CONSTRAINT_TYPE+D6_SPRING_CONSTRAINT_TYPE will likely become obsolete/deprecated at some stage

Definition at line 1117 of file btDiscreteDynamicsWorld.cpp.

## ◆ debugDrawWorld()

void btDiscreteDynamicsWorld::debugDrawWorld | ( |  | ) |
| virtual

Implements btDynamicsWorld.

Reimplemented in btSoftRigidDynamicsWorld, btSoftMultiBodyDynamicsWorld, btDeformableMultiBodyDynamicsWorld, and btMultiBodyDynamicsWorld.

Definition at line 269 of file btDiscreteDynamicsWorld.cpp.

## ◆ getApplySpeculativeContactRestitution()

bool btDiscreteDynamicsWorld::getApplySpeculativeContactRestitution | ( |  | ) | const
| inline

Definition at line 214 of file btDiscreteDynamicsWorld.h.

## ◆ getCollisionWorld()

btCollisionWorld* btDiscreteDynamicsWorld::getCollisionWorld | ( |  | ) |
| inline

Definition at line 135 of file btDiscreteDynamicsWorld.h.

## ◆ getConstraint() [1/2]

btTypedConstraint * btDiscreteDynamicsWorld::getConstraint | ( | int | index | ) |
| virtual

Reimplemented from btDynamicsWorld.

Definition at line 1370 of file btDiscreteDynamicsWorld.cpp.

## ◆ getConstraint() [2/2]

const btTypedConstraint * btDiscreteDynamicsWorld::getConstraint | ( | int | index | ) | const
| virtual

Reimplemented from btDynamicsWorld.

Definition at line 1374 of file btDiscreteDynamicsWorld.cpp.

## ◆ getConstraintSolver()

btConstraintSolver * btDiscreteDynamicsWorld::getConstraintSolver | ( |  | ) |
| virtual

Implements btDynamicsWorld.

Definition at line 1361 of file btDiscreteDynamicsWorld.cpp.

## ◆ getGravity()

btVector3 btDiscreteDynamicsWorld::getGravity | ( |  | ) | const
| virtual

Implements btDynamicsWorld.

Definition at line 512 of file btDiscreteDynamicsWorld.cpp.

## ◆ getLatencyMotionStateInterpolation()

bool btDiscreteDynamicsWorld::getLatencyMotionStateInterpolation | ( |  | ) | const
| inline

Definition at line 228 of file btDiscreteDynamicsWorld.h.

## ◆ getNonStaticRigidBodies() [1/2]

btAlignedObjectArray<btRigidBody*>& btDiscreteDynamicsWorld::getNonStaticRigidBodies | ( |  | ) |
| inline

Definition at line 233 of file btDiscreteDynamicsWorld.h.

## ◆ getNonStaticRigidBodies() [2/2]

const btAlignedObjectArray<btRigidBody*>& btDiscreteDynamicsWorld::getNonStaticRigidBodies | ( |  | ) | const
| inline

Definition at line 238 of file btDiscreteDynamicsWorld.h.

## ◆ getNumConstraints()

int btDiscreteDynamicsWorld::getNumConstraints | ( |  | ) | const
| virtual

Reimplemented from btDynamicsWorld.

Definition at line 1366 of file btDiscreteDynamicsWorld.cpp.

## ◆ getSimulationIslandManager() [1/2]

btSimulationIslandManager* btDiscreteDynamicsWorld::getSimulationIslandManager | ( |  | ) |
| inline

Definition at line 125 of file btDiscreteDynamicsWorld.h.

## ◆ getSimulationIslandManager() [2/2]

const btSimulationIslandManager* btDiscreteDynamicsWorld::getSimulationIslandManager | ( |  | ) | const
| inline

Definition at line 130 of file btDiscreteDynamicsWorld.h.

## ◆ getSynchronizeAllMotionStates()

bool btDiscreteDynamicsWorld::getSynchronizeAllMotionStates | ( |  | ) | const
| inline

Definition at line 204 of file btDiscreteDynamicsWorld.h.

## ◆ getWorldType()

virtual btDynamicsWorldType btDiscreteDynamicsWorld::getWorldType | ( |  | ) | const
| inlinevirtual

Implements btDynamicsWorld.

Reimplemented in btSoftRigidDynamicsWorld, btSoftMultiBodyDynamicsWorld, and btDeformableMultiBodyDynamicsWorld.

Definition at line 169 of file btDiscreteDynamicsWorld.h.

## ◆ integrateTransforms()

void btDiscreteDynamicsWorld::integrateTransforms | ( | btScalar | timeStep | ) |
| protectedvirtual

this should probably be switched on by default, but it is not well tested yet

Reimplemented in btDiscreteDynamicsWorldMt, btDeformableMultiBodyDynamicsWorld, and btMultiBodyDynamicsWorld.

Definition at line 1047 of file btDiscreteDynamicsWorld.cpp.

## ◆ integrateTransformsInternal()

void btDiscreteDynamicsWorld::integrateTransformsInternal | ( | btRigidBody ** | bodies,
|  | int | numBodies,
|  | btScalar | timeStep
| ) |  |
| protected

Definition at line 951 of file btDiscreteDynamicsWorld.cpp.

## ◆ internalSingleStepSimulation()

void btDiscreteDynamicsWorld::internalSingleStepSimulation | ( | btScalar | timeStep | ) |
| protectedvirtual

apply gravity, predict motion

perform collision detection

solve contact and other joint constraints

CallbackTriggers();

integrate transforms

update vehicle simulation

Reimplemented in btSoftRigidDynamicsWorld, btSoftMultiBodyDynamicsWorld, and btDeformableMultiBodyDynamicsWorld.

Definition at line 452 of file btDiscreteDynamicsWorld.cpp.

## ◆ predictUnconstraintMotion()

void btDiscreteDynamicsWorld::predictUnconstraintMotion | ( | btScalar | timeStep | ) |
| protectedvirtual

Reimplemented in btDiscreteDynamicsWorldMt, btSoftRigidDynamicsWorld, btSoftMultiBodyDynamicsWorld, btDeformableMultiBodyDynamicsWorld, and btMultiBodyDynamicsWorld.

Definition at line 1091 of file btDiscreteDynamicsWorld.cpp.

## ◆ releasePredictiveContacts()

void btDiscreteDynamicsWorld::releasePredictiveContacts | ( |  | ) |
| protected

Definition at line 929 of file btDiscreteDynamicsWorld.cpp.

## ◆ removeAction()

void btDiscreteDynamicsWorld::removeAction | ( | btActionInterface * | action | ) |
| virtual

Implements btDynamicsWorld.

Definition at line 656 of file btDiscreteDynamicsWorld.cpp.

## ◆ removeCharacter()

void btDiscreteDynamicsWorld::removeCharacter | ( | btActionInterface * | character | ) |
| virtual

obsolete, use removeAction instead

Reimplemented from btDynamicsWorld.

Definition at line 676 of file btDiscreteDynamicsWorld.cpp.

## ◆ removeCollisionObject()

void btDiscreteDynamicsWorld::removeCollisionObject | ( | btCollisionObject * | collisionObject | ) |
| virtual

removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btCollisionWorld::removeCollisionObject

Reimplemented from btCollisionWorld.

Reimplemented in btSoftRigidDynamicsWorld, btSoftMultiBodyDynamicsWorld, and btDeformableMultiBodyDynamicsWorld.

Definition at line 522 of file btDiscreteDynamicsWorld.cpp.

## ◆ removeConstraint()

void btDiscreteDynamicsWorld::removeConstraint | ( | btTypedConstraint * | constraint | ) |
| virtual

Reimplemented from btDynamicsWorld.

Definition at line 644 of file btDiscreteDynamicsWorld.cpp.

## ◆ removeRigidBody()

void btDiscreteDynamicsWorld::removeRigidBody | ( | btRigidBody * | body | ) |
| virtual

Implements btDynamicsWorld.

Definition at line 531 of file btDiscreteDynamicsWorld.cpp.

## ◆ removeVehicle()

void btDiscreteDynamicsWorld::removeVehicle | ( | btActionInterface * | vehicle | ) |
| virtual

obsolete, use removeAction instead

Reimplemented from btDynamicsWorld.

Definition at line 666 of file btDiscreteDynamicsWorld.cpp.

## ◆ saveKinematicState()

void btDiscreteDynamicsWorld::saveKinematicState | ( | btScalar | timeStep | ) |
| protectedvirtual

would like to iterate over m_nonStaticRigidBodies, but unfortunately old API allows to switch status after adding kinematic objects to the world fix it for Bullet 3.x release

Reimplemented in btMultiBodyDynamicsWorld.

Definition at line 249 of file btDiscreteDynamicsWorld.cpp.

## ◆ serialize()

void btDiscreteDynamicsWorld::serialize | ( | btSerializer * | serializer | ) |
| virtual

Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (see Bullet/Demos/SerializeDemo)

Reimplemented from btCollisionWorld.

Reimplemented in btSoftRigidDynamicsWorld, btSoftMultiBodyDynamicsWorld, and btMultiBodyDynamicsWorld.

Definition at line 1456 of file btDiscreteDynamicsWorld.cpp.

## ◆ serializeDynamicsWorldInfo()

void btDiscreteDynamicsWorld::serializeDynamicsWorldInfo | ( | btSerializer * | serializer | ) |
| protected

Definition at line 1405 of file btDiscreteDynamicsWorld.cpp.

## ◆ serializeRigidBodies()

void btDiscreteDynamicsWorld::serializeRigidBodies | ( | btSerializer * | serializer | ) |
| protected

Definition at line 1379 of file btDiscreteDynamicsWorld.cpp.

## ◆ setApplySpeculativeContactRestitution()

void btDiscreteDynamicsWorld::setApplySpeculativeContactRestitution | ( | bool | enable | ) |
| inline

Definition at line 209 of file btDiscreteDynamicsWorld.h.

## ◆ setConstraintSolver()

void btDiscreteDynamicsWorld::setConstraintSolver | ( | btConstraintSolver * | solver | ) |
| virtual

Implements btDynamicsWorld.

Reimplemented in btMultiBodyDynamicsWorld.

Definition at line 1350 of file btDiscreteDynamicsWorld.cpp.

## ◆ setGravity()

void btDiscreteDynamicsWorld::setGravity | ( | const btVector3 & | gravity | ) |
| virtual

Implements btDynamicsWorld.

Definition at line 499 of file btDiscreteDynamicsWorld.cpp.

## ◆ setLatencyMotionStateInterpolation()

void btDiscreteDynamicsWorld::setLatencyMotionStateInterpolation | ( | bool | latencyInterpolation | ) |
| inline

Interpolate motion state between previous and current transform, instead of current and next transform.

This can relieve discontinuities in the rendering, due to penetrations

Definition at line 224 of file btDiscreteDynamicsWorld.h.

## ◆ setNumTasks()

virtual void btDiscreteDynamicsWorld::setNumTasks | ( | int | numTasks | ) |
| inlinevirtual

Definition at line 180 of file btDiscreteDynamicsWorld.h.

## ◆ setSynchronizeAllMotionStates()

void btDiscreteDynamicsWorld::setSynchronizeAllMotionStates | ( | bool | synchronizeAll | ) |
| inline

Definition at line 200 of file btDiscreteDynamicsWorld.h.

## ◆ solveConstraints()

void btDiscreteDynamicsWorld::solveConstraints | ( | btContactSolverInfo & | solverInfo | ) |
| virtual

solve all the constraints for this island

Reimplemented in btDiscreteDynamicsWorldMt, and btMultiBodyDynamicsWorld.

Definition at line 681 of file btDiscreteDynamicsWorld.cpp.

## ◆ startProfiling()

void btDiscreteDynamicsWorld::startProfiling | ( | btScalar | timeStep | ) |
| protected

Definition at line 1108 of file btDiscreteDynamicsWorld.cpp.

## ◆ stepSimulation()

int btDiscreteDynamicsWorld::stepSimulation | ( | btScalar | timeStep,
|  | int | maxSubSteps = `1`,
|  | btScalar | fixedTimeStep = `btScalar(1.) / btScalar(60.)`
| ) |  |
| virtual

if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's

Implements btDynamicsWorld.

Reimplemented in btDeformableMultiBodyDynamicsWorld, and btDiscreteDynamicsWorldMt.

Definition at line 382 of file btDiscreteDynamicsWorld.cpp.

## ◆ synchronizeMotionStates()

void btDiscreteDynamicsWorld::synchronizeMotionStates | ( |  | ) |
| virtual

Implements btDynamicsWorld.

Definition at line 356 of file btDiscreteDynamicsWorld.cpp.

## ◆ synchronizeSingleMotionState()

void btDiscreteDynamicsWorld::synchronizeSingleMotionState | ( | btRigidBody * | body | ) |

this can be useful to synchronize a single rigid body -> graphics object

Definition at line 335 of file btDiscreteDynamicsWorld.cpp.

## ◆ updateActions()

void btDiscreteDynamicsWorld::updateActions | ( | btScalar | timeStep | ) |
| protected

Definition at line 584 of file btDiscreteDynamicsWorld.cpp.

## ◆ updateActivationState()

void btDiscreteDynamicsWorld::updateActivationState | ( | btScalar | timeStep | ) |
| protectedvirtual

Reimplemented in btDeformableMultiBodyDynamicsWorld, and btMultiBodyDynamicsWorld.

Definition at line 594 of file btDiscreteDynamicsWorld.cpp.

## ◆ updateVehicles()

virtual void btDiscreteDynamicsWorld::updateVehicles | ( | btScalar | timeStep | ) |
| inlinevirtual

obsolete, use updateActions instead

Definition at line 186 of file btDiscreteDynamicsWorld.h.

## Member Data Documentation

## ◆ m_actions

btAlignedObjectArray<btActionInterface*> btDiscreteDynamicsWorld::m_actions
| protected

Definition at line 63 of file btDiscreteDynamicsWorld.h.

## ◆ m_applySpeculativeContactRestitution

bool btDiscreteDynamicsWorld::m_applySpeculativeContactRestitution
| protected

Definition at line 61 of file btDiscreteDynamicsWorld.h.

## ◆ m_constraints

btAlignedObjectArray<btTypedConstraint*> btDiscreteDynamicsWorld::m_constraints
| protected

Definition at line 47 of file btDiscreteDynamicsWorld.h.

## ◆ m_constraintSolver

btConstraintSolver* btDiscreteDynamicsWorld::m_constraintSolver
| protected

Definition at line 43 of file btDiscreteDynamicsWorld.h.

## ◆ m_fixedTimeStep

btScalar btDiscreteDynamicsWorld::m_fixedTimeStep
| protected

Definition at line 55 of file btDiscreteDynamicsWorld.h.

## ◆ m_gravity

btVector3 btDiscreteDynamicsWorld::m_gravity
| protected

Definition at line 51 of file btDiscreteDynamicsWorld.h.

## ◆ m_islandManager

btSimulationIslandManager* btDiscreteDynamicsWorld::m_islandManager
| protected

Definition at line 45 of file btDiscreteDynamicsWorld.h.

## ◆ m_latencyMotionStateInterpolation

bool btDiscreteDynamicsWorld::m_latencyMotionStateInterpolation
| protected

Definition at line 67 of file btDiscreteDynamicsWorld.h.

## ◆ m_localTime

btScalar btDiscreteDynamicsWorld::m_localTime
| protected

Definition at line 54 of file btDiscreteDynamicsWorld.h.

## ◆ m_nonStaticRigidBodies

btAlignedObjectArray<btRigidBody*> btDiscreteDynamicsWorld::m_nonStaticRigidBodies
| protected

Definition at line 49 of file btDiscreteDynamicsWorld.h.

## ◆ m_ownsConstraintSolver

bool btDiscreteDynamicsWorld::m_ownsConstraintSolver
| protected

Definition at line 59 of file btDiscreteDynamicsWorld.h.

## ◆ m_ownsIslandManager

bool btDiscreteDynamicsWorld::m_ownsIslandManager
| protected

Definition at line 58 of file btDiscreteDynamicsWorld.h.

## ◆ m_predictiveManifolds

btAlignedObjectArray<btPersistentManifold*> btDiscreteDynamicsWorld::m_predictiveManifolds
| protected

Definition at line 69 of file btDiscreteDynamicsWorld.h.

## ◆ m_predictiveManifoldsMutex

btSpinMutex btDiscreteDynamicsWorld::m_predictiveManifoldsMutex
| protected

Definition at line 70 of file btDiscreteDynamicsWorld.h.

## ◆ m_profileTimings

int btDiscreteDynamicsWorld::m_profileTimings
| protected

Definition at line 65 of file btDiscreteDynamicsWorld.h.

## ◆ m_solverIslandCallback

InplaceSolverIslandCallback* btDiscreteDynamicsWorld::m_solverIslandCallback
| protected

Definition at line 41 of file btDiscreteDynamicsWorld.h.

## ◆ m_sortedConstraints

btAlignedObjectArray<btTypedConstraint*> btDiscreteDynamicsWorld::m_sortedConstraints
| protected

Definition at line 40 of file btDiscreteDynamicsWorld.h.

## ◆ m_synchronizeAllMotionStates

bool btDiscreteDynamicsWorld::m_synchronizeAllMotionStates
| protected

Definition at line 60 of file btDiscreteDynamicsWorld.h.

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

- btDiscreteDynamicsWorld.h
- btDiscreteDynamicsWorld.cpp