New predicates :

compare_squared_distance(Point_[23], Point_[23], FT), with
  CompareSquaredDistance_[23] functors.
This commit is contained in:
Sylvain Pion
2006-10-24 05:24:31 +00:00
parent 232264bed8
commit fbe285ca94
20 changed files with 247 additions and 2 deletions
@@ -421,6 +421,22 @@ namespace CartesianKernelFunctors {
}
};
template <typename K>
class Compare_squared_distance_2
{
typedef typename K::Point_2 Point_2;
typedef typename K::FT FT;
public:
typedef typename K::Comparison_result result_type;
typedef Arity_tag< 3 > Arity;
result_type
operator()(const Point_2& p, const Point_2& q, const FT& d2) const
{
return CGAL_NTS compare(squared_distance(p, q), d2);
}
};
template <typename K>
class Compare_distance_3
{
@@ -438,6 +454,22 @@ namespace CartesianKernelFunctors {
}
};
template <typename K>
class Compare_squared_distance_3
{
typedef typename K::Point_3 Point_3;
typedef typename K::FT FT;
public:
typedef typename K::Comparison_result result_type;
typedef Arity_tag< 3 > Arity;
result_type
operator()(const Point_3& p, const Point_3& q, const FT& d2) const
{
return CGAL_NTS compare(squared_distance(p, q), d2);
}
};
template <typename K>
class Compare_slope_2
{