diff --git a/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp b/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp index 3ebe3ed8a..4353cdac0 100644 --- a/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp +++ b/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp @@ -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 ) { diff --git a/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp b/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp index d253562fc..226245979 100644 --- a/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp +++ b/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp @@ -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; } diff --git a/src/BulletCollision/CollisionShapes/btConvexHullShape.h b/src/BulletCollision/CollisionShapes/btConvexHullShape.h index cea379d29..95a2af6a3 100644 --- a/src/BulletCollision/CollisionShapes/btConvexHullShape.h +++ b/src/BulletCollision/CollisionShapes/btConvexHullShape.h @@ -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 diff --git a/src/BulletCollision/CollisionShapes/btConvexShape.cpp b/src/BulletCollision/CollisionShapes/btConvexShape.cpp index e45981756..8c67d8ebe 100644 --- a/src/BulletCollision/CollisionShapes/btConvexShape.cpp +++ b/src/BulletCollision/CollisionShapes/btConvexShape.cpp @@ -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; } diff --git a/src/BulletCollision/CollisionShapes/btConvexShape.h b/src/BulletCollision/CollisionShapes/btConvexShape.h index de4a991ee..290cd9fd1 100644 --- a/src/BulletCollision/CollisionShapes/btConvexShape.h +++ b/src/BulletCollision/CollisionShapes/btConvexShape.h @@ -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 diff --git a/src/BulletCollision/CollisionShapes/btTriangleInfoMap.h b/src/BulletCollision/CollisionShapes/btTriangleInfoMap.h index 5aadfc670..03e288b35 100644 --- a/src/BulletCollision/CollisionShapes/btTriangleInfoMap.h +++ b/src/BulletCollision/CollisionShapes/btTriangleInfoMap.h @@ -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;