Code: Select all
m_World->getDispatcher()->dispatchAllCollisionPairs(pairCache, m_World->getDispatchInfo(), m_World->getDispatcher());
const unsigned int numPairs = pairCache->getNumOverlappingPairs();
btManifoldArray manifoldArray;
for(unsigned int i = 0; i< numPairs;++i)
{
const btBroadphasePair* cPair = &pairCache->getOverlappingPairArray()[i];
{
manifoldArray.resize(0);
if (cPair->m_algorithm)
cPair->m_algorithm->getAllContactManifolds(manifoldArray);
for (int j=0;j<manifoldArray.size();j++)
{
btPersistentManifold* manifold = manifoldArray[j];
if(manifold->getNumContacts())
{
return true;
}
else
{
//TODO: determine if we're entirely enclosed by the volume or not
}
}
}
}
}