updated to make projects compiler under double precision. GIMPACT compiles/links, but doesn't work properly.
This commit is contained in:
@@ -101,10 +101,10 @@ SIMD_FORCE_INLINE bool POINT_IN_HULL(
|
|||||||
const CLASS_POINT& point,const CLASS_PLANE * planes,GUINT plane_count)
|
const CLASS_POINT& point,const CLASS_PLANE * planes,GUINT plane_count)
|
||||||
{
|
{
|
||||||
GREAL _dis;
|
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);
|
_dis = DISTANCE_PLANE_POINT(planes[_i],point);
|
||||||
if(_dis>0.0f) return false;
|
if(_dis>0.0f) return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -473,7 +473,7 @@ SIMD_FORCE_INLINE void SEGMENT_COLLISION(
|
|||||||
VEC_CROSS(_M,_N,_BD);
|
VEC_CROSS(_M,_N,_BD);
|
||||||
_M[3] = VEC_DOT(_M,vB1);
|
_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*/
|
/*Closest point on segment*/
|
||||||
VEC_DIFF(vPointB,vPointA,vB1);
|
VEC_DIFF(vPointB,vPointA,vB1);
|
||||||
_tp = VEC_DOT(vPointB, _BD);
|
_tp = VEC_DOT(vPointB, _BD);
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ if 0.0<= u+v <=1.0 then they are inside of triangle
|
|||||||
faceplane[3] = m_vertices[0].dot(faceplane);
|
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(res == 0) return false;
|
||||||
if(! is_point_inside(pout,faceplane)) 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);
|
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(res != 1) return false;
|
||||||
|
|
||||||
if(!is_point_inside(pout,faceplane)) return false;
|
if(!is_point_inside(pout,faceplane)) return false;
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ void btHingeConstraint::solveConstraint(btScalar timeStep)
|
|||||||
|
|
||||||
// Clamp the accumulated impulse
|
// Clamp the accumulated impulse
|
||||||
btScalar temp = m_accLimitImpulse;
|
btScalar temp = m_accLimitImpulse;
|
||||||
m_accLimitImpulse = btMax(m_accLimitImpulse + impulseMag, 0.0f );
|
m_accLimitImpulse = btMax(m_accLimitImpulse + impulseMag, btScalar(0) );
|
||||||
impulseMag = m_accLimitImpulse - temp;
|
impulseMag = m_accLimitImpulse - temp;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user