Fixes for double precision compilation
Thanks to Dennis Cappendijk for the report and fix See Issue 575
This commit is contained in:
@@ -510,14 +510,14 @@ void btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObject*
|
||||
|
||||
// Get closest edge
|
||||
int bestedge=-1;
|
||||
float disttobestedge=BT_LARGE_FLOAT;
|
||||
btScalar disttobestedge=BT_LARGE_FLOAT;
|
||||
//
|
||||
// Edge 0 -> 1
|
||||
if (btFabs(info->m_edgeV0V1Angle)< triangleInfoMapPtr->m_maxEdgeAngleThreshold)
|
||||
{
|
||||
btVector3 nearest;
|
||||
btNearestPointInLineSegment( cp.m_localPointB, v0, v1, nearest );
|
||||
float len=(contact-nearest).length();
|
||||
btScalar len=(contact-nearest).length();
|
||||
//
|
||||
if( len < disttobestedge )
|
||||
{
|
||||
@@ -530,7 +530,7 @@ void btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObject*
|
||||
{
|
||||
btVector3 nearest;
|
||||
btNearestPointInLineSegment( cp.m_localPointB, v1, v2, nearest );
|
||||
float len=(contact-nearest).length();
|
||||
btScalar len=(contact-nearest).length();
|
||||
//
|
||||
if( len < disttobestedge )
|
||||
{
|
||||
@@ -543,7 +543,7 @@ void btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObject*
|
||||
{
|
||||
btVector3 nearest;
|
||||
btNearestPointInLineSegment( cp.m_localPointB, v2, v0, nearest );
|
||||
float len=(contact-nearest).length();
|
||||
btScalar len=(contact-nearest).length();
|
||||
//
|
||||
if( len < disttobestedge )
|
||||
{
|
||||
|
||||
@@ -208,7 +208,7 @@ const char* btConvexHullShape::serialize(void* dataBuffer, btSerializer* seriali
|
||||
return "btConvexHullShapeData";
|
||||
}
|
||||
|
||||
void btConvexHullShape::project(const btTransform& trans, const btVector3& dir, float& min, float& max) const
|
||||
void btConvexHullShape::project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max) const
|
||||
{
|
||||
#if 1
|
||||
min = FLT_MAX;
|
||||
@@ -221,7 +221,7 @@ void btConvexHullShape::project(const btTransform& trans, const btVector3& dir,
|
||||
{
|
||||
btVector3 vtx = m_unscaledPoints[i] * m_localScaling;
|
||||
btVector3 pt = trans * vtx;
|
||||
float dp = pt.dot(dir);
|
||||
btScalar dp = pt.dot(dir);
|
||||
if(dp < min)
|
||||
{
|
||||
min = dp;
|
||||
@@ -244,7 +244,7 @@ void btConvexHullShape::project(const btTransform& trans, const btVector3& dir,
|
||||
|
||||
if(min>max)
|
||||
{
|
||||
float tmp = min;
|
||||
btScalar tmp = min;
|
||||
min = max;
|
||||
max = tmp;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
|
||||
|
||||
|
||||
virtual void project(const btTransform& trans, const btVector3& dir, float& min, float& max) const;
|
||||
virtual void project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max) const;
|
||||
|
||||
|
||||
//debugging
|
||||
|
||||
@@ -43,7 +43,7 @@ btConvexShape::~btConvexShape()
|
||||
}
|
||||
|
||||
|
||||
void btConvexShape::project(const btTransform& trans, const btVector3& dir, float& min, float& max) const
|
||||
void btConvexShape::project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max) const
|
||||
{
|
||||
btVector3 localAxis = dir*trans.getBasis();
|
||||
btVector3 vtx1 = trans(localGetSupportingVertex(localAxis));
|
||||
@@ -54,7 +54,7 @@ void btConvexShape::project(const btTransform& trans, const btVector3& dir, floa
|
||||
|
||||
if(min>max)
|
||||
{
|
||||
float tmp = min;
|
||||
btScalar tmp = min;
|
||||
min = max;
|
||||
max = tmp;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
btScalar getMarginNonVirtual () const;
|
||||
void getAabbNonVirtual (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const;
|
||||
|
||||
virtual void project(const btTransform& trans, const btVector3& dir, float& min, float& max) const;
|
||||
virtual void project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max) const;
|
||||
|
||||
|
||||
//notice that the vectors should be unit length
|
||||
|
||||
@@ -88,9 +88,9 @@ struct btTriangleInfoMap : public btInternalTriangleInfoMap
|
||||
struct btTriangleInfoData
|
||||
{
|
||||
int m_flags;
|
||||
float m_edgeV0V1Angle;
|
||||
float m_edgeV1V2Angle;
|
||||
float m_edgeV2V0Angle;
|
||||
btScalar m_edgeV0V1Angle;
|
||||
btScalar m_edgeV1V2Angle;
|
||||
btScalar m_edgeV2V0Angle;
|
||||
};
|
||||
|
||||
struct btTriangleInfoMapData
|
||||
@@ -100,11 +100,11 @@ struct btTriangleInfoMapData
|
||||
btTriangleInfoData *m_valueArrayPtr;
|
||||
int *m_keyArrayPtr;
|
||||
|
||||
float m_convexEpsilon;
|
||||
float m_planarEpsilon;
|
||||
float m_equalVertexThreshold;
|
||||
float m_edgeDistanceThreshold;
|
||||
float m_zeroAreaThreshold;
|
||||
btScalar m_convexEpsilon;
|
||||
btScalar m_planarEpsilon;
|
||||
btScalar m_equalVertexThreshold;
|
||||
btScalar m_edgeDistanceThreshold;
|
||||
btScalar m_zeroAreaThreshold;
|
||||
|
||||
int m_nextSize;
|
||||
int m_hashTableSize;
|
||||
|
||||
Reference in New Issue
Block a user