make relative contact breaking threshold optional (use dispatcher->setDispatcherFlags(0) to turn off feature)

This commit is contained in:
erwin.coumans
2009-12-13 20:22:21 +00:00
parent 8444d0e5c4
commit 0a6f7b271d
4 changed files with 29 additions and 20 deletions

View File

@@ -15,9 +15,6 @@ subject to the following restrictions:
#include "BulletCollision/CollisionShapes/btCollisionShape.h"
btScalar gContactThresholdFactor=btScalar(0.02);
/*
Make sure this dummy function never changes so that it
can be used by probes that are checking whether the
@@ -45,10 +42,11 @@ void btCollisionShape::getBoundingSphere(btVector3& center,btScalar& radius) con
}
btScalar btCollisionShape::getContactBreakingThreshold() const
btScalar btCollisionShape::getContactBreakingThreshold(btScalar defaultContactThreshold) const
{
return getAngularMotionDisc() * gContactThresholdFactor;
return getAngularMotionDisc() * defaultContactThreshold;
}
btScalar btCollisionShape::getAngularMotionDisc() const
{
///@todo cache this value, to improve performance