more solver experiments, randomize the order of contact points, not just manifolds

use #defines for constants, rather then const btScalar
This commit is contained in:
ejcoumans
2006-11-04 05:22:36 +00:00
parent c4c4523a4e
commit 23c64fb0db
11 changed files with 71 additions and 51 deletions

View File

@@ -116,18 +116,18 @@ btRigidBody::btRigidBody( float mass,const btTransform& worldTransform,btCollisi
//note there this influences deactivation thresholds!
float gClippedAngvelThresholdSqr = 0.01f;
float gClippedLinearThresholdSqr = 0.01f;
float gJitterVelocityDampingFactor = 1.0f;
float gJitterVelocityDampingFactor = 1.f;
#endif //EXPERIMENTAL_JITTER_REMOVAL
void btRigidBody::predictIntegratedTransform(btScalar timeStep,btTransform& predictedTransform)
{
#ifdef EXPERIMENTAL_JITTER_REMOVAL
if (wantsSleeping())
//if (wantsSleeping())
{
//clip to avoid jitter
// if ((m_angularVelocity.length2() < gClippedAngvelThresholdSqr) &&
// (m_linearVelocity.length2() < gClippedLinearThresholdSqr))
if ((m_angularVelocity.length2() < gClippedAngvelThresholdSqr) &&
(m_linearVelocity.length2() < gClippedLinearThresholdSqr))
{
m_angularVelocity *= gJitterVelocityDampingFactor;
m_linearVelocity *= gJitterVelocityDampingFactor;