Add specializations for Compare_distance_3 for points/segments

This commit is contained in:
Andreas Fabri
2016-04-13 12:35:00 +02:00
parent 01b9b87bd8
commit 2613be3c1b
3 changed files with 168 additions and 6 deletions
@@ -462,6 +462,7 @@ namespace CartesianKernelFunctors {
class Compare_distance_3
{
typedef typename K::Point_3 Point_3;
typedef typename K::Segment_3 Segment_3;
public:
typedef typename K::Comparison_result result_type;
@@ -473,6 +474,25 @@ namespace CartesianKernelFunctors {
r.x(), r.y(), r.z());
}
result_type
operator()(const Point_3& p1, const Segment_3& s1, const Segment_3& s2) const
{
return CGAL::compare_distance(p1,s1,s2);
}
result_type
operator()(const Point_3& p1, const Point_3& p2, const Segment_3& s2) const
{
return CGAL::compare_distance(p1,p2,s2);
}
result_type
operator()(const Point_3& p1, const Segment_3& s2, const Point_3& p2) const
{
return CGAL::compare_distance(p1,p2,s2);
}
template <class T1, class T2, class T3>
result_type
operator()(const T1& p, const T2& q, const T3& r) const