don't crash if the maximum number of pairs is exceeded, but report an error using b3Error

This commit is contained in:
erwin coumans
2013-06-17 13:23:41 -07:00
parent f73d11d896
commit 31282ab85e
5 changed files with 17 additions and 10 deletions

View File

@@ -144,7 +144,7 @@ void b3GpuRigidBodyPipeline::stepSimulation(float deltaTime)
numPairs = m_data->m_broadphaseDbvt->getOverlappingPairCache()->getNumOverlappingPairs();
} else
{
m_data->m_broadphaseSap->calculateOverlappingPairs();
m_data->m_broadphaseSap->calculateOverlappingPairs(m_data->m_config.m_maxBroadphasePairs);
numPairs = m_data->m_broadphaseSap->getNumOverlap();
}
}