Refactoring to enable multi SAP broadphase.

This was already planned, and Pierre Terdiman recent thread motivated me to decouple the paircache from the sweep and prune.
http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1329
This commit is contained in:
ejcoumans
2007-08-02 23:48:46 +00:00
parent 5279f9e129
commit 1f7646f72a
29 changed files with 212 additions and 85 deletions

View File

@@ -450,12 +450,12 @@ void DemoApplication::shootBox(const btVector3& destination)
startTransform.setIdentity();
btVector3 camPos = getCameraPosition();
startTransform.setOrigin(camPos);
#define TEST_UNIFORM_SCALING_SHAPE 1
//#define TEST_UNIFORM_SCALING_SHAPE 1
#ifdef TEST_UNIFORM_SCALING_SHAPE
btConvexShape* childShape = new btBoxShape(btVector3(1.f,1.f,1.f));
btUniformScalingShape* boxShape = new btUniformScalingShape(childShape,0.5f);
#else
btCollisionShape* boxShape = new btSphereShape(1);
btCollisionShape* boxShape = new btBoxShape(btVector3(0.5f,0.5f,0.5f));
#endif//
btRigidBody* body = this->localCreateRigidBody(mass, startTransform,boxShape);
@@ -932,7 +932,7 @@ void DemoApplication::clientResetScene()
colObj->activate();
}
//removed cached contact points
m_dynamicsWorld->getBroadphase()->cleanProxyFromPairs(colObj->getBroadphaseHandle());
m_dynamicsWorld->getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(colObj->getBroadphaseHandle());
btRigidBody* body = btRigidBody::upcast(colObj);
if (body && !body->isStaticObject())