Remove redundant comparison functors

This commit is contained in:
Giles Bathgate 2021-07-19 17:38:07 +01:00
parent f856f05861
commit 38a23a84a7
2 changed files with 0 additions and 69 deletions

View File

@ -62,32 +62,6 @@ private:
Coordinate coord;
};
template <typename Vertex, typename Coordinate, typename EK>
class Smaller_than<CGAL::Lazy_kernel<EK>, Vertex, Coordinate>
{
public:
Smaller_than(Coordinate c) : coord(c) {
CGAL_assertion( c >= 0 && c <=2);
}
bool operator()( const Vertex& v1, const Vertex& v2) {
switch(coord) {
case 0: return CGAL::to_interval(v1->point().x()).second <
CGAL::to_interval(v2->point().x()).first;
case 1: return CGAL::to_interval(v1->point().y()).second <
CGAL::to_interval(v2->point().y()).first;
case 2: return CGAL::to_interval(v1->point().z()).second <
CGAL::to_interval(v2->point().z()).first;
default: CGAL_error();
}
return false;
}
private:
Coordinate coord;
};
public:
friend class Objects_along_ray;
friend class Objects_around_segment;

View File

@ -56,49 +56,6 @@ private:
};
template <typename Coordinate, typename EK>
class Compare_points<CGAL::Lazy_kernel<EK>, Coordinate> {
typedef CGAL::Lazy_kernel<EK> Kernel;
typedef typename Kernel::Point_3 Point_3;
public:
Compare_points(Coordinate c) : coord(c) {
CGAL_assertion( c >= 0 && c <=2);
}
CGAL::Comparison_result operator()( const Point_3& p1, const Point_3& p2) {
switch(coord) {
case 0:
if(CGAL::to_interval(p1.x()).second <
CGAL::to_interval(p2.x()).first)
return CGAL::SMALLER;
else if(CGAL::to_interval(p2.x()).second <
CGAL::to_interval(p1.x()).first)
return CGAL::LARGER;
return CGAL::EQUAL;
case 1:
if(CGAL::to_interval(p1.y()).second <
CGAL::to_interval(p2.y()).first)
return CGAL::SMALLER;
else if(CGAL::to_interval(p2.y()).second <
CGAL::to_interval(p1.y()).first)
return CGAL::LARGER;
return CGAL::EQUAL;
case 2:
if(CGAL::to_interval(p1.z()).second <
CGAL::to_interval(p2.z()).first)
return CGAL::SMALLER;
else if(CGAL::to_interval(p2.z()).second <
CGAL::to_interval(p1.z()).first)
return CGAL::LARGER;
return CGAL::EQUAL;
default: CGAL_error();
}
return CGAL::EQUAL;
}
private:
Coordinate coord;
};
template <class SNC_decorator>
class Side_of_plane {