Bullet Collision Detection & Physics Library
|
The btSimpleDynamicsWorld serves as unit-test and to verify more complicated and optimized dynamics worlds. More...
#include <btSimpleDynamicsWorld.h>
Public Member Functions | |
btSimpleDynamicsWorld (btDispatcher *dispatcher, btBroadphaseInterface *pairCache, btConstraintSolver *constraintSolver, btCollisionConfiguration *collisionConfiguration) | |
this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver More... | |
virtual | ~btSimpleDynamicsWorld () |
virtual int | stepSimulation (btScalar timeStep, int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.)) |
maxSubSteps/fixedTimeStep for interpolation is currently ignored for btSimpleDynamicsWorld, use btDiscreteDynamicsWorld instead More... | |
virtual void | setGravity (const btVector3 &gravity) |
virtual btVector3 | getGravity () const |
virtual void | addRigidBody (btRigidBody *body) |
virtual void | addRigidBody (btRigidBody *body, short group, short mask) |
virtual void | removeRigidBody (btRigidBody *body) |
virtual void | debugDrawWorld () |
virtual void | addAction (btActionInterface *action) |
virtual void | removeAction (btActionInterface *action) |
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 | updateAabbs () |
virtual void | synchronizeMotionStates () |
virtual void | setConstraintSolver (btConstraintSolver *solver) |
virtual btConstraintSolver * | getConstraintSolver () |
virtual btDynamicsWorldType | getWorldType () const |
virtual void | clearForces () |
Public Member Functions inherited from btDynamicsWorld | |
btDynamicsWorld (btDispatcher *dispatcher, btBroadphaseInterface *broadphase, btCollisionConfiguration *collisionConfiguration) | |
virtual | ~btDynamicsWorld () |
virtual void | addConstraint (btTypedConstraint *constraint, bool disableCollisionsBetweenLinkedBodies=false) |
virtual void | removeConstraint (btTypedConstraint *constraint) |
virtual int | getNumConstraints () const |
virtual btTypedConstraint * | getConstraint (int index) |
virtual const btTypedConstraint * | getConstraint (int index) const |
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 () |
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... | |
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 | 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 | addCollisionObject (btCollisionObject *collisionObject, short int collisionFilterGroup=btBroadphaseProxy::DefaultFilter, short int collisionFilterMask=btBroadphaseProxy::AllFilter) |
btCollisionObjectArray & | getCollisionObjectArray () |
const btCollisionObjectArray & | getCollisionObjectArray () const |
virtual void | performDiscreteCollisionDetection () |
btDispatcherInfo & | getDispatchInfo () |
const btDispatcherInfo & | getDispatchInfo () const |
bool | getForceUpdateAllAabbs () const |
void | setForceUpdateAllAabbs (bool forceUpdateAllAabbs) |
virtual void | serialize (btSerializer *serializer) |
Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (Bullet/Demos/SerializeDemo) More... | |
Protected Member Functions | |
void | predictUnconstraintMotion (btScalar timeStep) |
void | integrateTransforms (btScalar timeStep) |
Protected Member Functions inherited from btCollisionWorld | |
void | serializeCollisionObjects (btSerializer *serializer) |
Protected Attributes | |
btConstraintSolver * | m_constraintSolver |
bool | m_ownsConstraintSolver |
btVector3 | m_gravity |
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) |
The btSimpleDynamicsWorld serves as unit-test and to verify more complicated and optimized dynamics worlds.
Please use btDiscreteDynamicsWorld instead
Definition at line 27 of file btSimpleDynamicsWorld.h.
btSimpleDynamicsWorld::btSimpleDynamicsWorld | ( | btDispatcher * | dispatcher, |
btBroadphaseInterface * | pairCache, | ||
btConstraintSolver * | constraintSolver, | ||
btCollisionConfiguration * | collisionConfiguration | ||
) |
this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver
Definition at line 39 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Definition at line 49 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 174 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 148 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 158 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 98 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 169 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 277 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 128 of file btSimpleDynamicsWorld.cpp.
|
inlinevirtual |
Implements btDynamicsWorld.
Definition at line 80 of file btSimpleDynamicsWorld.h.
|
protected |
Definition at line 205 of file btSimpleDynamicsWorld.cpp.
|
protected |
Definition at line 225 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 179 of file btSimpleDynamicsWorld.cpp.
|
virtual |
removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btCollisionWorld::removeCollisionObject
Reimplemented from btCollisionWorld.
Definition at line 138 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 133 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 267 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 114 of file btSimpleDynamicsWorld.cpp.
|
virtual |
maxSubSteps/fixedTimeStep for interpolation is currently ignored for btSimpleDynamicsWorld, use btDiscreteDynamicsWorld instead
apply gravity, predict motion
perform collision detection
solve contact constraints
integrate transforms
Implements btDynamicsWorld.
Definition at line 55 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Implements btDynamicsWorld.
Definition at line 248 of file btSimpleDynamicsWorld.cpp.
|
virtual |
Reimplemented from btCollisionWorld.
Definition at line 185 of file btSimpleDynamicsWorld.cpp.
|
protected |
Definition at line 31 of file btSimpleDynamicsWorld.h.
|
protected |
Definition at line 39 of file btSimpleDynamicsWorld.h.
|
protected |
Definition at line 33 of file btSimpleDynamicsWorld.h.