Bullet only: update to work with SVN revision 813 of bullet. For now
you have to define NEWBULLET when compiling the physics. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1271 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
638970bd46
commit
9ea37bf14f
@ -31,21 +31,31 @@
|
||||
/** Initialise physics. */
|
||||
Physics::Physics(float gravity)
|
||||
{
|
||||
|
||||
// The bullet interface has changed recently, define NEWBULLET
|
||||
// for the new interface, default is the old interface. This version
|
||||
// works with SVN revision 813 of bullet.
|
||||
|
||||
#ifdef NEWBULLET
|
||||
btDefaultCollisionConfiguration* collisionConf = new btDefaultCollisionConfiguration();
|
||||
btCollisionDispatcher *dispatcher = new btCollisionDispatcher(collisionConf);
|
||||
#else
|
||||
btCollisionDispatcher *dispatcher = new btCollisionDispatcher();
|
||||
#endif
|
||||
btVector3 worldMin(-1000, -1000, -1000);
|
||||
btVector3 worldMax( 1000, 1000, 1000);
|
||||
|
||||
// The bullet interface has changed recently, define NEWBULLET
|
||||
// for the new interface, default is the old interface
|
||||
#ifdef NEWBULLET
|
||||
btBroadphaseInterface *pairCache = new btAxisSweep3(worldMin, worldMax);
|
||||
btBroadphaseInterface *axis_sweep = new btAxisSweep3(worldMin, worldMax);
|
||||
btConstraintSolver *constraintSolver = new btSequentialImpulseConstraintSolver();
|
||||
m_dynamics_world = new btDiscreteDynamicsWorld(dispatcher, axis_sweep,
|
||||
constraintSolver);
|
||||
#else
|
||||
btOverlappingPairCache *pairCache = new btAxisSweep3(worldMin, worldMax);
|
||||
btOverlappingPairCache *pairCache = new btAxisSweep3(worldMin, worldMax);
|
||||
btConstraintSolver *constraintSolver = new btSequentialImpulseConstraintSolver();
|
||||
#endif
|
||||
m_dynamics_world = new btDiscreteDynamicsWorld(dispatcher, pairCache,
|
||||
constraintSolver);
|
||||
#endif
|
||||
m_dynamics_world->setGravity(btVector3(0.0f, 0.0f, -gravity));
|
||||
if(user_config->m_bullet_debug)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user