Blender V2.61 - r43446
|
#include <btSimpleDynamicsWorld.h>
Public Member Functions | |
btSimpleDynamicsWorld (btDispatcher *dispatcher, btBroadphaseInterface *pairCache, btConstraintSolver *constraintSolver, btCollisionConfiguration *collisionConfiguration) | |
this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver | |
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 | |
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 | |
virtual void | updateAabbs () |
virtual void | synchronizeMotionStates () |
virtual void | setConstraintSolver (btConstraintSolver *solver) |
virtual btConstraintSolver * | getConstraintSolver () |
virtual btDynamicsWorldType | getWorldType () const |
virtual void | clearForces () |
Protected Member Functions | |
void | predictUnconstraintMotion (btScalar timeStep) |
void | integrateTransforms (btScalar timeStep) |
Protected Attributes | |
btConstraintSolver * | m_constraintSolver |
bool | m_ownsConstraintSolver |
btVector3 | m_gravity |
The btSimpleDynamicsWorld serves as unit-test and to verify more complicated and optimized dynamics worlds. Please use btDiscreteDynamicsWorld instead (or btContinuousDynamicsWorld once it is finished).
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.
btSimpleDynamicsWorld::~btSimpleDynamicsWorld | ( | ) | [virtual] |
Definition at line 49 of file btSimpleDynamicsWorld.cpp.
References btAlignedFree, m_constraintSolver, and m_ownsConstraintSolver.
void btSimpleDynamicsWorld::addAction | ( | btActionInterface * | action | ) | [virtual] |
Implements btDynamicsWorld.
Definition at line 174 of file btSimpleDynamicsWorld.cpp.
void btSimpleDynamicsWorld::addRigidBody | ( | btRigidBody * | body | ) | [virtual] |
Implements btDynamicsWorld.
Definition at line 148 of file btSimpleDynamicsWorld.cpp.
References btCollisionWorld::addCollisionObject(), btRigidBody::getCollisionShape(), m_gravity, and btRigidBody::setGravity().
void btSimpleDynamicsWorld::addRigidBody | ( | btRigidBody * | body, |
short | group, | ||
short | mask | ||
) | [virtual] |
Implements btDynamicsWorld.
Definition at line 158 of file btSimpleDynamicsWorld.cpp.
References btCollisionWorld::addCollisionObject(), btRigidBody::getCollisionShape(), m_gravity, and btRigidBody::setGravity().
void btSimpleDynamicsWorld::clearForces | ( | ) | [virtual] |
Implements btDynamicsWorld.
Definition at line 98 of file btSimpleDynamicsWorld.cpp.
References btRigidBody::clearForces(), i, btCollisionWorld::m_collisionObjects, btAlignedObjectArray< T >::size(), and btRigidBody::upcast().
Referenced by stepSimulation().
void btSimpleDynamicsWorld::debugDrawWorld | ( | ) | [virtual] |
Implements btDynamicsWorld.
Definition at line 169 of file btSimpleDynamicsWorld.cpp.
btConstraintSolver * btSimpleDynamicsWorld::getConstraintSolver | ( | ) | [virtual] |
Implements btDynamicsWorld.
Definition at line 277 of file btSimpleDynamicsWorld.cpp.
References m_constraintSolver.
btVector3 btSimpleDynamicsWorld::getGravity | ( | ) | const [virtual] |
Implements btDynamicsWorld.
Definition at line 128 of file btSimpleDynamicsWorld.cpp.
References m_gravity.
virtual btDynamicsWorldType btSimpleDynamicsWorld::getWorldType | ( | ) | const [inline, virtual] |
Implements btDynamicsWorld.
Definition at line 80 of file btSimpleDynamicsWorld.h.
References BT_SIMPLE_DYNAMICS_WORLD.
void btSimpleDynamicsWorld::integrateTransforms | ( | btScalar | timeStep | ) | [protected] |
Definition at line 205 of file btSimpleDynamicsWorld.cpp.
References i, btCollisionWorld::m_collisionObjects, btRigidBody::predictIntegratedTransform(), btRigidBody::proceedToTransform(), btAlignedObjectArray< T >::size(), and btRigidBody::upcast().
Referenced by stepSimulation().
void btSimpleDynamicsWorld::predictUnconstraintMotion | ( | btScalar | timeStep | ) | [protected] |
Definition at line 225 of file btSimpleDynamicsWorld.cpp.
References btRigidBody::applyDamping(), btRigidBody::applyGravity(), i, btRigidBody::integrateVelocities(), btCollisionWorld::m_collisionObjects, btRigidBody::predictIntegratedTransform(), btAlignedObjectArray< T >::size(), and btRigidBody::upcast().
Referenced by stepSimulation().
void btSimpleDynamicsWorld::removeAction | ( | btActionInterface * | action | ) | [virtual] |
Implements btDynamicsWorld.
Definition at line 179 of file btSimpleDynamicsWorld.cpp.
void btSimpleDynamicsWorld::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.
Definition at line 138 of file btSimpleDynamicsWorld.cpp.
References removeRigidBody(), and btRigidBody::upcast().
Referenced by removeRigidBody().
void btSimpleDynamicsWorld::removeRigidBody | ( | btRigidBody * | body | ) | [virtual] |
Implements btDynamicsWorld.
Definition at line 133 of file btSimpleDynamicsWorld.cpp.
References removeCollisionObject().
Referenced by removeCollisionObject().
void btSimpleDynamicsWorld::setConstraintSolver | ( | btConstraintSolver * | solver | ) | [virtual] |
Implements btDynamicsWorld.
Definition at line 267 of file btSimpleDynamicsWorld.cpp.
References btAlignedFree, m_constraintSolver, and m_ownsConstraintSolver.
void btSimpleDynamicsWorld::setGravity | ( | const btVector3 & | gravity | ) | [virtual] |
Implements btDynamicsWorld.
Definition at line 114 of file btSimpleDynamicsWorld.cpp.
References i, btCollisionWorld::m_collisionObjects, m_gravity, btRigidBody::setGravity(), btAlignedObjectArray< T >::size(), and btRigidBody::upcast().
int btSimpleDynamicsWorld::stepSimulation | ( | btScalar | timeStep, |
int | maxSubSteps = 1 , |
||
btScalar | fixedTimeStep = btScalar(1.)/btScalar(60.) |
||
) | [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.
References btConstraintSolver::allSolved(), clearForces(), btCollisionWorld::getCollisionObjectArray(), btCollisionWorld::getDebugDrawer(), btCollisionWorld::getDispatchInfo(), btCollisionWorld::getNumCollisionObjects(), btDispatcher::getNumManifolds(), integrateTransforms(), m_constraintSolver, btDispatcherInfo::m_debugDraw, btCollisionWorld::m_debugDrawer, btCollisionWorld::m_dispatcher1, btCollisionWorld::m_stackAlloc, btDispatcherInfo::m_stepCount, btDispatcherInfo::m_timeStep, btContactSolverInfoData::m_timeStep, btCollisionWorld::performDiscreteCollisionDetection(), predictUnconstraintMotion(), btConstraintSolver::prepareSolve(), btConstraintSolver::solveGroup(), synchronizeMotionStates(), and updateAabbs().
void btSimpleDynamicsWorld::synchronizeMotionStates | ( | ) | [virtual] |
Implements btDynamicsWorld.
Definition at line 248 of file btSimpleDynamicsWorld.cpp.
References btRigidBody::getMotionState(), i, ISLAND_SLEEPING, btCollisionWorld::m_collisionObjects, btMotionState::setWorldTransform(), btAlignedObjectArray< T >::size(), and btRigidBody::upcast().
Referenced by stepSimulation().
void btSimpleDynamicsWorld::updateAabbs | ( | ) | [virtual] |
Reimplemented from btCollisionWorld.
Definition at line 185 of file btSimpleDynamicsWorld.cpp.
References btCollisionWorld::getBroadphase(), i, btCollisionWorld::m_collisionObjects, btCollisionWorld::m_dispatcher1, btBroadphaseInterface::setAabb(), btAlignedObjectArray< T >::size(), and btRigidBody::upcast().
Referenced by stepSimulation().
Definition at line 31 of file btSimpleDynamicsWorld.h.
Referenced by getConstraintSolver(), setConstraintSolver(), stepSimulation(), and ~btSimpleDynamicsWorld().
btVector3 btSimpleDynamicsWorld::m_gravity [protected] |
Definition at line 39 of file btSimpleDynamicsWorld.h.
Referenced by addRigidBody(), getGravity(), and setGravity().
bool btSimpleDynamicsWorld::m_ownsConstraintSolver [protected] |
Definition at line 33 of file btSimpleDynamicsWorld.h.
Referenced by setConstraintSolver(), and ~btSimpleDynamicsWorld().