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:
@@ -28,7 +28,7 @@ void btConvexPointCloudShape::setLocalScaling(const btVector3& scaling)
|
||||
btVector3 btConvexPointCloudShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
|
||||
{
|
||||
btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.));
|
||||
btScalar newDot,maxDot = btScalar(-1e30);
|
||||
btScalar newDot,maxDot = btScalar(-BT_LARGE_FLOAT);
|
||||
|
||||
btVector3 vec = vec0;
|
||||
btScalar lenSqr = vec.length2();
|
||||
@@ -63,7 +63,7 @@ void btConvexPointCloudShape::batchedUnitVectorGetSupportingVertexWithoutMargin(
|
||||
{
|
||||
for (int i=0;i<numVectors;i++)
|
||||
{
|
||||
supportVerticesOut[i][3] = btScalar(-1e30);
|
||||
supportVerticesOut[i][3] = btScalar(-BT_LARGE_FLOAT);
|
||||
}
|
||||
}
|
||||
for (int i=0;i<m_numPoints;i++)
|
||||
|
||||
Reference in New Issue
Block a user