rename treshold into thresold (spelling mistake)
added cr/linefeed at end of btDefaultMotionState.h
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user