rename treshold into thresold (spelling mistake)

added cr/linefeed at end of btDefaultMotionState.h
This commit is contained in:
ejcoumans
2006-10-30 05:06:46 +00:00
parent dd8297c86e
commit b14ccdaa57
14 changed files with 40 additions and 40 deletions

View File

@@ -102,10 +102,10 @@ bool SphereTriangleDetector::collide(const btVector3& sphereCenter,btVector3 &po
normal *= -1.f;
}
///todo: move this gContactBreakingTreshold into a proper structure
extern float gContactBreakingTreshold;
///todo: move this gContactBreakingThreshold into a proper structure
extern float gContactBreakingThreshold;
float contactMargin = gContactBreakingTreshold;
float contactMargin = gContactBreakingThreshold;
bool isInsideContactPlane = distanceFromPlane < r + contactMargin;
bool isInsideShellPlane = distanceFromPlane < r;

View File

@@ -24,7 +24,7 @@ btCollisionObject::btCollisionObject()
m_userObjectPointer(0),
m_hitFraction(1.f),
m_ccdSweptSphereRadius(0.f),
m_ccdSquareMotionTreshold(0.f)
m_ccdSquareMotionThreshold(0.f)
{
}

View File

@@ -73,8 +73,8 @@ struct btCollisionObject
///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
float m_ccdSweptSphereRadius;
/// Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionTreshold
float m_ccdSquareMotionTreshold;
/// Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionThreshold
float m_ccdSquareMotionThreshold;
inline bool mergesSimulationIslands() const
{

View File

@@ -205,10 +205,10 @@ float btConvexConcaveCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject
//quick approximation using raycast, todo: hook up to the continuous collision detection (one of the btConvexCast)
//only perform CCD above a certain treshold, this prevents blocking on the long run
//only perform CCD above a certain threshold, this prevents blocking on the long run
//because object in a blocked ccd state (hitfraction<1) get their linear velocity halved each frame...
float squareMot0 = (convexbody->m_interpolationWorldTransform.getOrigin() - convexbody->m_worldTransform.getOrigin()).length2();
if (squareMot0 < convexbody->m_ccdSquareMotionTreshold)
if (squareMot0 < convexbody->m_ccdSquareMotionThreshold)
{
return 1.f;
}

View File

@@ -165,7 +165,7 @@ void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btColl
//TODO: if (dispatchInfo.m_useContinuous)
m_gjkPairDetector.setMinkowskiA(min0);
m_gjkPairDetector.setMinkowskiB(min1);
input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingTreshold();
input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold();
input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared;
// input.m_maximumDistanceSquared = 1e30f;
@@ -183,17 +183,17 @@ void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btColl
bool disableCcd = false;
float btConvexConvexAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
{
///Rather then checking ALL pairs, only calculate TOI when motion exceeds treshold
///Rather then checking ALL pairs, only calculate TOI when motion exceeds threshold
///Linear motion for one of objects needs to exceed m_ccdSquareMotionTreshold
///Linear motion for one of objects needs to exceed m_ccdSquareMotionThreshold
///col0->m_worldTransform,
float resultFraction = 1.f;
float squareMot0 = (col0->m_interpolationWorldTransform.getOrigin() - col0->m_worldTransform.getOrigin()).length2();
if (squareMot0 < col0->m_ccdSquareMotionTreshold &&
squareMot0 < col0->m_ccdSquareMotionTreshold)
if (squareMot0 < col0->m_ccdSquareMotionThreshold &&
squareMot0 < col0->m_ccdSquareMotionThreshold)
return resultFraction;

View File

@@ -58,7 +58,7 @@ void btManifoldResult::addContactPoint(const btVector3& normalOnBInWorld,const b
assert(m_manifoldPtr);
//order in manifold needs to match
if (depth > m_manifoldPtr->getContactBreakingTreshold())
if (depth > m_manifoldPtr->getContactBreakingThreshold())
return;
bool isSwapped = m_manifoldPtr->getBody0() != m_body0;

View File

@@ -18,7 +18,7 @@ subject to the following restrictions:
#include "LinearMath/btTransform.h"
#include <assert.h>
float gContactBreakingTreshold = 0.02f;
float gContactBreakingThreshold = 0.02f;
ContactDestroyedCallback gContactDestroyedCallback = 0;
@@ -151,7 +151,7 @@ int btPersistentManifold::sortCachedPoints(const btManifoldPoint& pt)
int btPersistentManifold::getCacheEntry(const btManifoldPoint& newPoint) const
{
btScalar shortestDist = getContactBreakingTreshold() * getContactBreakingTreshold();
btScalar shortestDist = getContactBreakingThreshold() * getContactBreakingThreshold();
int size = getNumContacts();
int nearestPoint = -1;
for( int i = 0; i < size; i++ )
@@ -193,9 +193,9 @@ void btPersistentManifold::AddManifoldPoint(const btManifoldPoint& newPoint)
replaceContactPoint(newPoint,insertIndex);
}
float btPersistentManifold::getContactBreakingTreshold() const
float btPersistentManifold::getContactBreakingThreshold() const
{
return gContactBreakingTreshold;
return gContactBreakingThreshold;
}
void btPersistentManifold::refreshContactPoints(const btTransform& trA,const btTransform& trB)
@@ -229,7 +229,7 @@ void btPersistentManifold::refreshContactPoints(const btTransform& trA,const btT
projectedPoint = manifoldPoint.m_positionWorldOnA - manifoldPoint.m_normalWorldOnB * manifoldPoint.m_distance1;
projectedDifference = manifoldPoint.m_positionWorldOnB - projectedPoint;
distance2d = projectedDifference.dot(projectedDifference);
if (distance2d > getContactBreakingTreshold()*getContactBreakingTreshold() )
if (distance2d > getContactBreakingThreshold()*getContactBreakingThreshold() )
{
removeContactPoint(i);
}

View File

@@ -23,8 +23,8 @@ subject to the following restrictions:
struct btCollisionResult;
///contact breaking and merging treshold
extern float gContactBreakingTreshold;
///contact breaking and merging threshold
extern float gContactBreakingThreshold;
typedef bool (*ContactDestroyedCallback)(void* userPersistentData);
extern ContactDestroyedCallback gContactDestroyedCallback;
@@ -97,7 +97,7 @@ public:
}
/// todo: get this margin from the current physics / collision environment
float getContactBreakingTreshold() const;
float getContactBreakingThreshold() const;
int getCacheEntry(const btManifoldPoint& newPoint) const;
@@ -124,7 +124,7 @@ public:
bool validContactDistance(const btManifoldPoint& pt) const
{
return pt.m_distance1 <= getContactBreakingTreshold();
return pt.m_distance1 <= getContactBreakingThreshold();
}
/// calculated new worldspace coordinates and depth, and reject points that exceed the collision margin
void refreshContactPoints( const btTransform& trA,const btTransform& trB);