add btDiscreteDynamicsWorld::createPredictiveContacts after discrete collision detection and add temporary contact manifolds, for the constraint solver.

This should improve 'ccd' handling when using world->getDispatchInfo().m_useContinuous = true;body->setCcdSquareMotionThreshold(...); body->setCcdSquareMotionThreshold(...)
shoot smaller boxes (test)
use yellow instead of orange for contact point normals
tweak default erp and erp2 values, now split impulse is on by default (need to check it)
This commit is contained in:
erwin.coumans
2012-09-11 00:56:11 +00:00
parent 9cfcabfc4c
commit 9612561113
8 changed files with 116 additions and 13 deletions

View File

@@ -205,10 +205,13 @@ int btPersistentManifold::getCacheEntry(const btManifoldPoint& newPoint) const
return nearestPoint;
}
int btPersistentManifold::addManifoldPoint(const btManifoldPoint& newPoint)
int btPersistentManifold::addManifoldPoint(const btManifoldPoint& newPoint, bool isPredictive)
{
btAssert(validContactDistance(newPoint));
if (!isPredictive)
{
btAssert(validContactDistance(newPoint));
}
int insertIndex = getNumContacts();
if (insertIndex == MANIFOLD_CACHE_SIZE)
{

View File

@@ -149,7 +149,7 @@ public:
int getCacheEntry(const btManifoldPoint& newPoint) const;
int addManifoldPoint( const btManifoldPoint& newPoint);
int addManifoldPoint( const btManifoldPoint& newPoint, bool isPredictive=false);
void removeContactPoint (int index)
{