Add the option for the btSimulationIslandManager to avoid splitting islands (for constraint solving)

Move the convertContact inside constraint solver to its own method
This commit is contained in:
erwin.coumans
2009-02-13 02:34:46 +00:00
parent 26d7757135
commit d886c06fa5
10 changed files with 452 additions and 363 deletions

View File

@@ -1269,6 +1269,7 @@ void DemoApplication::clientResetScene()
numObjects = m_dynamicsWorld->getNumCollisionObjects();
}
///create a copy of the array, not a reference!
btCollisionObjectArray copyArray = m_dynamicsWorld->getCollisionObjectArray();
for (i=0;i<copyArray.size();i++)
@@ -1297,8 +1298,8 @@ void DemoApplication::clientResetScene()
colObj->setDeactivationTime(0);
//colObj->setActivationState(WANTS_DEACTIVATION);
}
//removed cached contact points
//m_dynamicsWorld->getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(colObj->getBroadphaseHandle(),getDynamicsWorld()->getDispatcher());
//removed cached contact points (this is not necessary if all objects have been removed from the dynamics world)
m_dynamicsWorld->getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(colObj->getBroadphaseHandle(),getDynamicsWorld()->getDispatcher());
btRigidBody* body = btRigidBody::upcast(colObj);
if (body && !body->isStaticObject())
@@ -1310,6 +1311,7 @@ void DemoApplication::clientResetScene()
}
///reset some internal cached data in the broadphase
m_dynamicsWorld->getBroadphase()->resetPool(getDynamicsWorld()->getDispatcher());
m_dynamicsWorld->getConstraintSolver()->reset();