Bullet Collision Detection & Physics Library
|
btDiscreteDynamicsWorld provides discrete rigid body simulation those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController More...
#include <btDiscreteDynamicsWorld.h>
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 | 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 |
![]() | |
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 |
![]() | |
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) |
Additional Inherited Members | |
![]() | |
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) |
btDiscreteDynamicsWorld provides discrete rigid body simulation those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController
Definition at line 38 of file btDiscreteDynamicsWorld.h.
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 203 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Definition at line 241 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 676 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
obsolete, use addAction instead
Reimplemented from btDynamicsWorld.
Definition at line 697 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Reimplemented from btCollisionWorld.
Definition at line 541 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Reimplemented from btDynamicsWorld.
Definition at line 656 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 562 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 587 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
obsolete, use addAction instead
Reimplemented from btDynamicsWorld.
Definition at line 687 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
apply gravity, call this once per timestep
Reimplemented in btMultiBodyDynamicsWorld.
Definition at line 339 of file btDiscreteDynamicsWorld.cpp.
btDiscreteDynamicsWorld::BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
|
protectedvirtual |
Reimplemented in btMultiBodyDynamicsWorld.
Definition at line 741 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
the forces on each rigidbody is accumulating together with gravity. clear this after each timestep.
Implements btDynamicsWorld.
Reimplemented in btMultiBodyDynamicsWorld.
Definition at line 326 of file btDiscreteDynamicsWorld.cpp.
|
protectedvirtual |
Reimplemented in btDiscreteDynamicsWorldMt.
Definition at line 981 of file btDiscreteDynamicsWorld.cpp.
|
protected |
Definition at line 883 of file btDiscreteDynamicsWorld.cpp.
|
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 1179 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Reimplemented in btMultiBodyDynamicsWorld, btSoftMultiBodyDynamicsWorld, and btSoftRigidDynamicsWorld.
Definition at line 283 of file btDiscreteDynamicsWorld.cpp.
|
inline |
Definition at line 219 of file btDiscreteDynamicsWorld.h.
|
inline |
Definition at line 138 of file btDiscreteDynamicsWorld.h.
|
virtual |
Reimplemented from btDynamicsWorld.
Definition at line 1438 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Reimplemented from btDynamicsWorld.
Definition at line 1442 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 1428 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 536 of file btDiscreteDynamicsWorld.cpp.
|
inline |
Definition at line 233 of file btDiscreteDynamicsWorld.h.
|
virtual |
Reimplemented from btDynamicsWorld.
Definition at line 1434 of file btDiscreteDynamicsWorld.cpp.
|
inline |
Definition at line 128 of file btDiscreteDynamicsWorld.h.
|
inline |
Definition at line 133 of file btDiscreteDynamicsWorld.h.
|
inline |
Definition at line 209 of file btDiscreteDynamicsWorld.h.
|
inlinevirtual |
Implements btDynamicsWorld.
Reimplemented in btSoftMultiBodyDynamicsWorld, and btSoftRigidDynamicsWorld.
Definition at line 174 of file btDiscreteDynamicsWorld.h.
|
protectedvirtual |
this should probably be switched on by default, but it is not well tested yet
Reimplemented in btDiscreteDynamicsWorldMt, and btMultiBodyDynamicsWorld.
Definition at line 1098 of file btDiscreteDynamicsWorld.cpp.
|
protected |
Definition at line 991 of file btDiscreteDynamicsWorld.cpp.
|
protectedvirtual |
apply gravity, predict motion
perform collision detection
solve contact and other joint constraints
CallbackTriggers();
integrate transforms
update vehicle simulation
Reimplemented in btSoftMultiBodyDynamicsWorld, and btSoftRigidDynamicsWorld.
Definition at line 473 of file btDiscreteDynamicsWorld.cpp.
|
protectedvirtual |
Reimplemented in btDiscreteDynamicsWorldMt, btSoftMultiBodyDynamicsWorld, and btSoftRigidDynamicsWorld.
Definition at line 1146 of file btDiscreteDynamicsWorld.cpp.
|
protected |
Definition at line 969 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 681 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
obsolete, use removeAction instead
Reimplemented from btDynamicsWorld.
Definition at line 702 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btCollisionWorld::removeCollisionObject
Reimplemented from btCollisionWorld.
Reimplemented in btSoftMultiBodyDynamicsWorld, and btSoftRigidDynamicsWorld.
Definition at line 546 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Reimplemented from btDynamicsWorld.
Definition at line 669 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 555 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
obsolete, use removeAction instead
Reimplemented from btDynamicsWorld.
Definition at line 692 of file btDiscreteDynamicsWorld.cpp.
|
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
Definition at line 262 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (see Bullet/Demos/SerializeDemo)
Reimplemented from btCollisionWorld.
Reimplemented in btMultiBodyDynamicsWorld, btSoftMultiBodyDynamicsWorld, and btSoftRigidDynamicsWorld.
Definition at line 1531 of file btDiscreteDynamicsWorld.cpp.
|
protected |
Definition at line 1478 of file btDiscreteDynamicsWorld.cpp.
|
protected |
Definition at line 1449 of file btDiscreteDynamicsWorld.cpp.
|
inline |
Definition at line 214 of file btDiscreteDynamicsWorld.h.
|
virtual |
Implements btDynamicsWorld.
Reimplemented in btMultiBodyDynamicsWorld.
Definition at line 1417 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 523 of file btDiscreteDynamicsWorld.cpp.
|
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 229 of file btDiscreteDynamicsWorld.h.
|
inlinevirtual |
Definition at line 185 of file btDiscreteDynamicsWorld.h.
|
inline |
Definition at line 205 of file btDiscreteDynamicsWorld.h.
|
protectedvirtual |
solve all the constraints for this island
Reimplemented in btDiscreteDynamicsWorldMt, and btMultiBodyDynamicsWorld.
Definition at line 710 of file btDiscreteDynamicsWorld.cpp.
|
protected |
Definition at line 1164 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's
Implements btDynamicsWorld.
Reimplemented in btDiscreteDynamicsWorldMt.
Definition at line 401 of file btDiscreteDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 375 of file btDiscreteDynamicsWorld.cpp.
void btDiscreteDynamicsWorld::synchronizeSingleMotionState | ( | btRigidBody * | body | ) |
this can be useful to synchronize a single rigid body -> graphics object
Definition at line 353 of file btDiscreteDynamicsWorld.cpp.
|
protected |
Definition at line 609 of file btDiscreteDynamicsWorld.cpp.
|
protectedvirtual |
Reimplemented in btMultiBodyDynamicsWorld.
Definition at line 620 of file btDiscreteDynamicsWorld.cpp.
|
inlinevirtual |
obsolete, use updateActions instead
Definition at line 191 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 65 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 63 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 49 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 45 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 57 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 53 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 47 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 69 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 56 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 51 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 61 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 60 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 71 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 72 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 67 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 43 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 42 of file btDiscreteDynamicsWorld.h.
|
protected |
Definition at line 62 of file btDiscreteDynamicsWorld.h.