+ make compound versus soft body work (soft body uses interpolated transform)

+ fixed issue with persistent manifold, warmstarting values were not initialized properly
+ don't clear manifold in sphere-sphere collision (need warmstarting)
+ added support for 'split impulse', decouple positional error correction from velocity correction
This avoids adding momentum due to penetration correction, it can be tuned using following variables:
solverInfo.m_splitImpulse = true/false (disable/enable)
solverInfo.m_splitImpulsePenetrationThreshold (below this value, baumgarte/mixed velocity/penetration is used (cheaper, looks more plausible)
solverInfo.m_linearSlop (less jitter, when small amound of penetration is allowed)
This commit is contained in:
erwin.coumans
2008-05-23 09:05:37 +00:00
parent ea86559480
commit 561066af75
13 changed files with 1611 additions and 1394 deletions

View File

@@ -41,6 +41,7 @@ btCollisionShape* gShapePtr[maxNumObjects];//1 rigidbody has 1 shape (no re-use
#ifdef SHOW_NUM_DEEP_PENETRATIONS
extern int gNumDeepPenetrationChecks;
extern int gNumSplitImpulseRecoveries;
extern int gNumGjkChecks;
extern int gNumAlignedAllocs;
extern int gNumAlignedFree;
@@ -1073,7 +1074,11 @@ void DemoApplication::renderme()
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
glRasterPos3f(xOffset,yStart,0);
sprintf(buf,"gNumSplitImpulseRecoveries= %d",gNumSplitImpulseRecoveries);
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
glRasterPos3f(xOffset,yStart,0);
sprintf(buf,"gNumAlignedAllocs = %d",gNumAlignedAllocs);
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);