updated to make projects compiler under double precision. GIMPACT compiles/links, but doesn't work properly.

This commit is contained in:
ejcoumans 2007-07-26 03:44:21 +00:00
parent bf967a458a
commit 49aa535be9
3 changed files with 6 additions and 6 deletions

View File

@ -101,10 +101,10 @@ SIMD_FORCE_INLINE bool POINT_IN_HULL(
const CLASS_POINT& point,const CLASS_PLANE * planes,GUINT plane_count)
{
GREAL _dis;
for (GUINT _i = 0;_i< plane_count;++_i)
for (GUINT _i = 0;_i< plane_count;++_i)
{
_dis = DISTANCE_PLANE_POINT(planes[_i],point);
if(_dis>0.0f) return false;
if(_dis>0.0f) return false;
}
return true;
}
@ -473,7 +473,7 @@ SIMD_FORCE_INLINE void SEGMENT_COLLISION(
VEC_CROSS(_M,_N,_BD);
_M[3] = VEC_DOT(_M,vB1);
LINE_PLANE_COLLISION(_M,_AD,vA1,vPointA,_tp,0.0f, 1.0f);
LINE_PLANE_COLLISION(_M,_AD,vA1,vPointA,_tp,btScalar(0), btScalar(1));
/*Closest point on segment*/
VEC_DIFF(vPointB,vPointA,vB1);
_tp = VEC_DOT(vPointB, _BD);

View File

@ -327,7 +327,7 @@ if 0.0<= u+v <=1.0 then they are inside of triangle
faceplane[3] = m_vertices[0].dot(faceplane);
}
GUINT res = LINE_PLANE_COLLISION(faceplane,vDir,vPoint,pout,tparam,0.0f, tmax);
GUINT res = LINE_PLANE_COLLISION(faceplane,vDir,vPoint,pout,tparam, btScalar(0), tmax);
if(res == 0) return false;
if(! is_point_inside(pout,faceplane)) return false;
@ -360,7 +360,7 @@ if 0.0<= u+v <=1.0 then they are inside of triangle
faceplane[3] = m_vertices[0].dot(faceplane);
}
GUINT res = LINE_PLANE_COLLISION(faceplane,vDir,vPoint,pout,tparam,0.0f, tmax);
GUINT res = LINE_PLANE_COLLISION(faceplane,vDir,vPoint,pout,tparam, btScalar(0), tmax);
if(res != 1) return false;
if(!is_point_inside(pout,faceplane)) return false;

View File

@ -345,7 +345,7 @@ void btHingeConstraint::solveConstraint(btScalar timeStep)
// Clamp the accumulated impulse
btScalar temp = m_accLimitImpulse;
m_accLimitImpulse = btMax(m_accLimitImpulse + impulseMag, 0.0f );
m_accLimitImpulse = btMax(m_accLimitImpulse + impulseMag, btScalar(0) );
impulseMag = m_accLimitImpulse - temp;