mirror of https://github.com/CGAL/cgal
add namespace specification for the issue with leda
This commit is contained in:
parent
cd798cc6eb
commit
b9b098604e
|
|
@ -52,7 +52,7 @@ compare_squared_distance(const typename K::Line_3& line1,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(line1,line2,k),d2);
|
return ::CGAL::compare(squared_distance(line1,line2,k),d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ compare_squared_distance(const typename K::Line_3& l,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(l, pl, k), d2);
|
return ::CGAL::compare(squared_distance(l, pl, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ compare_squared_distance(const typename K::Plane_3& plane1,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(plane1,plane2,k), d2);
|
return ::CGAL::compare(squared_distance(plane1,plane2,k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ compare_squared_distance(const typename K::Point_3& pt,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(pt, line, k), d2);
|
return ::CGAL::compare(squared_distance(pt, line, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ compare_squared_distance(const typename K::Point_3& pt,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(pt, plane, k), d2);
|
return ::CGAL::compare(squared_distance(pt, plane, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ compare_squared_distance(const typename K::Point_3& pt1,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(k.compute_squared_distance_3_object()(pt1, pt2), d2);
|
return ::CGAL::compare(k.compute_squared_distance_3_object()(pt1, pt2), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ compare_squared_distance(const typename K::Point_3& pt,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT &d2)
|
const typename K::FT &d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(pt, ray, k), d2);
|
return ::CGAL::compare(squared_distance(pt, ray, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ compare_squared_distance(const typename K::Point_3& pt,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
//Doing an early exit was slower.
|
//Doing an early exit was slower.
|
||||||
return compare(squared_distance(pt, seg, k), d2);
|
return ::CGAL::compare(squared_distance(pt, seg, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ compare_squared_distance(const typename K::Point_3& pt,
|
||||||
}
|
}
|
||||||
|
|
||||||
if(on_bounded_side)
|
if(on_bounded_side)
|
||||||
return compare(typename K::FT(0),d2);
|
return ::CGAL::compare(typename K::FT(0),d2);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -331,7 +331,7 @@ compare_squared_distance_to_triangle(const typename K::Point_3& pt,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compare first the distance to the plane, if larger we can exit early
|
// Compare first the distance to the plane, if larger we can exit early
|
||||||
typename K::Comparison_result res_p_pl = compare(squared_distance_to_plane(normal, vector(t0, pt), k), d2);
|
typename K::Comparison_result res_p_pl = ::CGAL::compare(squared_distance_to_plane(normal, vector(t0, pt), k), d2);
|
||||||
if(certainly(res_p_pl==LARGER))
|
if(certainly(res_p_pl==LARGER))
|
||||||
{
|
{
|
||||||
inside_or_far_to_the_plane=true;
|
inside_or_far_to_the_plane=true;
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ compare_squared_distance(const typename K::Ray_3& ray,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(ray, line, k), d2);
|
return ::CGAL::compare(squared_distance(ray, line, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ compare_squared_distance(const typename K::Ray_3& ray,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(ray, plane, k), d2);
|
return ::CGAL::compare(squared_distance(ray, plane, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ compare_squared_distance(const typename K::Ray_3& ray1,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(ray1, ray2, k), d2);
|
return ::CGAL::compare(squared_distance(ray1, ray2, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ compare_squared_distance(const typename K::Segment_3& seg,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
// Perform an early exit was slower
|
// Perform an early exit was slower
|
||||||
return compare(squared_distance(seg, line, k), d2);
|
return ::CGAL::compare(squared_distance(seg, line, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ compare_squared_distance(const typename K::Segment_3 &seg,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(seg, plane, k), d2);
|
return ::CGAL::compare(squared_distance(seg, plane, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ compare_squared_distance(const typename K::Ray_3& ray,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2)
|
const typename K::FT& d2)
|
||||||
{
|
{
|
||||||
return compare(squared_distance(ray, seg, k), d2);
|
return ::CGAL::compare(squared_distance(ray, seg, k), d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,7 @@ compare_squared_distance(const typename K::Segment_3& s1,
|
||||||
{
|
{
|
||||||
// res_y = 0;
|
// res_y = 0;
|
||||||
res_x = boost::algorithm::clamp<FT>(e/a, 0, 1); // (e + y*c) / a
|
res_x = boost::algorithm::clamp<FT>(e/a, 0, 1); // (e + y*c) / a
|
||||||
return compare(sq_dist(p1+res_x*v1,p2), d2);
|
return csq_dist(p1+res_x*v1,p2, d2);
|
||||||
}
|
}
|
||||||
else // y >= 0
|
else // y >= 0
|
||||||
{
|
{
|
||||||
|
|
@ -263,12 +263,12 @@ compare_squared_distance(const typename K::Segment_3& s1,
|
||||||
{
|
{
|
||||||
// res_y = 1;
|
// res_y = 1;
|
||||||
res_x = boost::algorithm::clamp<FT>((e + c) / a, 0, 1); // (e + y*c) / a
|
res_x = boost::algorithm::clamp<FT>((e + c) / a, 0, 1); // (e + y*c) / a
|
||||||
return compare(sq_dist(p1+res_x*v1,p2+v2), d2);
|
return csq_dist(p1+res_x*v1,p2+v2, d2);
|
||||||
}
|
}
|
||||||
else if(res_x==0 || res_x==1) // 0 <= y <= 1
|
else if(res_x==0 || res_x==1) // 0 <= y <= 1
|
||||||
{
|
{
|
||||||
FT res_y = n / d;
|
FT res_y = n / d;
|
||||||
return compare(sq_dist(p1 + res_x*v1, p2 + res_y*v2), d2);
|
return csq_dist(p1 + res_x*v1, p2 + res_y*v2, d2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -278,7 +278,7 @@ compare_squared_distance(const typename K::Segment_3& s1,
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Faster with Simple_cartesian<double>, a bit slower with EPICK or EPECK specifically if d2 is small
|
// Faster with Simple_cartesian<double>, a bit slower with EPICK or EPECK specifically if d2 is small
|
||||||
return compare(squared_distance(s1, s2 ,k), d2);
|
return ::CGAL::compare(squared_distance(s1, s2 ,k), d2);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -262,11 +262,11 @@ compare_squared_distance(const typename K::Triangle_3& tr1,
|
||||||
const typename K::Triangle_3& tr2,
|
const typename K::Triangle_3& tr2,
|
||||||
const K& k,
|
const K& k,
|
||||||
const typename K::FT& d2){
|
const typename K::FT& d2){
|
||||||
//TODO did something more intelligent (sq_dist and csq_dist does not exist for Segment-Triangle)
|
// sq_dist and csq_dist does not exist for Segment-Triangle, sq supports degenerate triangle
|
||||||
if(tr1.is_degenerate() || tr2.is_degenerate())
|
if(tr1.is_degenerate() || tr2.is_degenerate())
|
||||||
return compare(squared_distance(tr1,tr2, k), d2);
|
return ::CGAL::compare(squared_distance(tr1,tr2, k), d2);
|
||||||
if(do_intersect(tr1, tr2))
|
if(do_intersect(tr1, tr2))
|
||||||
return compare(typename K::FT(0), d2);
|
return ::CGAL::compare(typename K::FT(0), d2);
|
||||||
return compare_squared_distance_disjoint(tr1, tr2, k, d2);
|
return compare_squared_distance_disjoint(tr1, tr2, k, d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue