Replace all hardcoded 1e30(f) by BT_LARGE_FLOAT, defined in btScalar.h as 1e18(f) so that its square still fits in FLT_MAX

Thanks to Ole K. for reporting! http://code.google.com/p/bullet/issues/detail?id=206
This commit is contained in:
erwin.coumans
2009-05-23 02:15:54 +00:00
parent 1e11223f6b
commit badf723257
51 changed files with 127 additions and 124 deletions

View File

@@ -62,8 +62,8 @@ void btBU_Simplex1to4::getAabb(const btTransform& t,btVector3& aabbMin,btVector3
#if 1
btPolyhedralConvexAabbCachingShape::getAabb(t,aabbMin,aabbMax);
#else
aabbMin.setValue(1e30f,1e30f,1e30f);
aabbMax.setValue(-1e30f,-1e30f,-1e30f);
aabbMin.setValue(BT_LARGE_FLOAT,BT_LARGE_FLOAT,BT_LARGE_FLOAT);
aabbMax.setValue(-BT_LARGE_FLOAT,-BT_LARGE_FLOAT,-BT_LARGE_FLOAT);
//just transform the vertices in worldspace, and take their AABB
for (int i=0;i<m_numVertices;i++)