+ improved split impulse constraint solver option
+ improved friction warm starting + made constraint solver configuration more consistent (moved m_solverMode into btContactSolverInfo) + reset timing in CDTestFramework after initialization (SAP init destorts timings) + make it easier to change default sizes for stack allocator in btDefaultCollisionConfiguration
This commit is contained in:
@@ -16,8 +16,18 @@ subject to the following restrictions:
|
||||
#ifndef CONTACT_SOLVER_INFO
|
||||
#define CONTACT_SOLVER_INFO
|
||||
|
||||
enum btSolverMode
|
||||
{
|
||||
SOLVER_RANDMIZE_ORDER = 1,
|
||||
SOLVER_FRICTION_SEPARATE = 2,
|
||||
SOLVER_USE_WARMSTARTING = 4,
|
||||
SOLVER_CACHE_FRIENDLY = 8
|
||||
};
|
||||
|
||||
struct btContactSolverInfoData
|
||||
{
|
||||
|
||||
|
||||
btScalar m_tau;
|
||||
btScalar m_damping;
|
||||
btScalar m_friction;
|
||||
@@ -27,10 +37,13 @@ struct btContactSolverInfoData
|
||||
btScalar m_maxErrorReduction;
|
||||
btScalar m_sor;
|
||||
btScalar m_erp;//used as Baumgarte factor
|
||||
bool m_splitImpulse;
|
||||
btScalar m_erp2;//used in Split Impulse
|
||||
int m_splitImpulse;
|
||||
btScalar m_splitImpulsePenetrationThreshold;
|
||||
btScalar m_linearSlop;
|
||||
btScalar m_warmstartingFactor;
|
||||
|
||||
int m_solverMode;
|
||||
|
||||
|
||||
};
|
||||
@@ -38,6 +51,8 @@ struct btContactSolverInfoData
|
||||
struct btContactSolverInfo : public btContactSolverInfoData
|
||||
{
|
||||
|
||||
|
||||
|
||||
inline btContactSolverInfo()
|
||||
{
|
||||
m_tau = btScalar(0.6);
|
||||
@@ -47,10 +62,13 @@ struct btContactSolverInfo : public btContactSolverInfoData
|
||||
m_maxErrorReduction = btScalar(20.);
|
||||
m_numIterations = 10;
|
||||
m_erp = btScalar(0.2);
|
||||
m_erp2 = btScalar(0.1);
|
||||
m_sor = btScalar(1.3);
|
||||
m_splitImpulse = true;
|
||||
m_splitImpulsePenetrationThreshold = 1.f;
|
||||
m_linearSlop = 0.0002f;
|
||||
m_splitImpulse = false;
|
||||
m_splitImpulsePenetrationThreshold = -0.02f;
|
||||
m_linearSlop = btScalar(0.0);
|
||||
m_warmstartingFactor=btScalar(0.85);
|
||||
m_solverMode = SOLVER_RANDMIZE_ORDER | SOLVER_CACHE_FRIENDLY | SOLVER_USE_WARMSTARTING;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user