From 999e110d0166d92dc223c8d09f4f3d626352d456 Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 15 Oct 2010 21:46:16 +0000 Subject: [PATCH] renamed EPSILON into loc_EPSILON to avoid collsions with some defines. --- vcg/space/distance3.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vcg/space/distance3.h b/vcg/space/distance3.h index 203710db..4c47cf61 100644 --- a/vcg/space/distance3.h +++ b/vcg/space/distance3.h @@ -144,7 +144,7 @@ void LineLineDistance(const vcg::Line3 &mLine0, vcg::Point3 &mClosestPoint0, vcg::Point3 &mClosestPoint1) { - const ScalarType EPSILON=(ScalarType)0.000000001; + const ScalarType loc_EPSILON=ScalarType(0.000000001); typedef typename vcg::Point3 CoordType; CoordType diff = mLine0.Origin() - mLine1.Origin(); ScalarType a01 = -mLine0.Direction()* mLine1.Direction(); @@ -153,7 +153,7 @@ void LineLineDistance(const vcg::Line3 &mLine0, ScalarType det = fabs((ScalarType)1 - a01*a01); ScalarType b1, s0, s1, sqrDist; - if (det >=EPSILON) + if (det >=loc_EPSILON) { // Lines are not parallel. b1 = -diff*(mLine1.Direction()); @@ -284,7 +284,7 @@ void SegmentSegmentDistance(const vcg::Segment3 &s0, ///find the minimum distance between extremes to segments ScalarType dist_test; CoordType clos_test; - CoordType to_test[4]={s1.P0(),s1.P1(),s0.P0(),s1.P1()}; + //CoordType to_test[4]={s1.P0(),s1.P1(),s0.P0(),s1.P1()}; ///find combination of distances between all extremes and segments SegmentPointSquaredDistance(s0,s1.P0(),clos_test,dist); @@ -465,7 +465,7 @@ void TriangleTriangleDistance(const vcg::Triangle3 &t0, const vcg::Triangle3 &t1, ScalarType &dist) { - const ScalarType EPSILON=(vcg::DoubleArea(t0)+vcg::DoubleArea(t1))*(ScalarType)0.0000001; + const ScalarType loc_EPSILON=(vcg::DoubleArea(t0)+vcg::DoubleArea(t1))*(ScalarType)0.0000001; dist=std::numeric_limits::max(); ///test each segment of t1 with t0 @@ -475,7 +475,7 @@ void TriangleTriangleDistance(const vcg::Triangle3 &t0, vcg::Segment3 edge=vcg::Segment3(t0.P0(i),t0.P0((i+1)%3)); ScalarType test_dist; vcg::TriangleSegmentDistance(t1,edge,test_dist); - if (test_dist &t0, vcg::Segment3 edge=vcg::Segment3(t1.P0(i),t1.P0((i+1)%3)); ScalarType test_dist; vcg::TriangleSegmentDistance(t0,edge,test_dist); - if (test_dist