improve handling of restitution by using the velocity (linear/angular) before applying forces: this is done by re-introducing the btSolverBody and only apply the forces to solver body, and use the original rigid body velocity for restitution computation.
warmstarting for contact points was broken, fix in btPersistentManifold enable split impulse by default (at the cost of some performance) add the option for zero-length friction (instead of recomputing friction directions using btPlaneSpace), use the solver mode flag SOLVER_ALLOW_ZERO_LENGTH_FRICTION_DIRECTIONS precompute lateral friction directions (in btManifoldResult) remove the mConstraintRow[3] from btManifoldPoint, it just took a lot of memory with no benefits: fixed it in btParallelConstraintSolver
This commit is contained in:
@@ -76,9 +76,7 @@ class btManifoldPoint
|
||||
m_contactCFM2(0.f),
|
||||
m_lifeTime(0)
|
||||
{
|
||||
mConstraintRow[0].m_accumImpulse = 0.f;
|
||||
mConstraintRow[1].m_accumImpulse = 0.f;
|
||||
mConstraintRow[2].m_accumImpulse = 0.f;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -94,16 +92,16 @@ class btManifoldPoint
|
||||
btScalar m_combinedFriction;
|
||||
btScalar m_combinedRestitution;
|
||||
|
||||
//BP mod, store contact triangles.
|
||||
int m_partId0;
|
||||
int m_partId1;
|
||||
int m_index0;
|
||||
int m_index1;
|
||||
//BP mod, store contact triangles.
|
||||
int m_partId0;
|
||||
int m_partId1;
|
||||
int m_index0;
|
||||
int m_index1;
|
||||
|
||||
mutable void* m_userPersistentData;
|
||||
btScalar m_appliedImpulse;
|
||||
|
||||
bool m_lateralFrictionInitialized;
|
||||
|
||||
btScalar m_appliedImpulse;
|
||||
btScalar m_appliedImpulseLateral1;
|
||||
btScalar m_appliedImpulseLateral2;
|
||||
btScalar m_contactMotion1;
|
||||
@@ -118,8 +116,6 @@ class btManifoldPoint
|
||||
|
||||
|
||||
|
||||
btConstraintRow mConstraintRow[3];
|
||||
|
||||
|
||||
btScalar getDistance() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user