Add a minimum solver 'batch' size to avoid solving many small (independent) islands separately

Default size is 128 . Disable feature by using dynamicsWorld->getSolverInfo().m_minimumSolverBatchSize = 1;
This commit is contained in:
erwin.coumans
2010-02-06 22:21:44 +00:00
parent a9556d0fd5
commit 7782952d6b
2 changed files with 45 additions and 5 deletions

View File

@@ -52,6 +52,7 @@ struct btContactSolverInfoData
int m_solverMode;
int m_restingContactRestitutionThreshold;
int m_minimumSolverBatchSize;
};
@@ -79,6 +80,7 @@ struct btContactSolverInfo : public btContactSolverInfoData
m_warmstartingFactor=btScalar(0.85);
m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_SIMD;// | SOLVER_RANDMIZE_ORDER;
m_restingContactRestitutionThreshold = 2;//resting contact lifetime threshold to disable restitution
m_minimumSolverBatchSize = 128; //try to combine islands until the amount of constraints reaches this limit
}
};