mirror of https://github.com/CGAL/cgal
removed object Side_of_hyperbolic_face from Misha's traits
This commit is contained in:
parent
8985edbfa1
commit
d2b5f66280
|
|
@ -1062,98 +1062,6 @@ public:
|
|||
{ return Is_hyperbolic(); }
|
||||
|
||||
|
||||
/****************************************************/
|
||||
class Side_of_hyperbolic_face_2 {
|
||||
|
||||
public:
|
||||
typedef Bounded_side result_type;
|
||||
|
||||
Side_of_hyperbolic_face_2() {}
|
||||
|
||||
|
||||
template<class Face_handle>
|
||||
Bounded_side operator()(const Point_2 p, Bounded_side sides[3], const Face_handle fh) const {
|
||||
|
||||
Point_2 p1 = fh->vertex(0)->point();
|
||||
Point_2 p2 = fh->vertex(1)->point();
|
||||
Point_2 p3 = fh->vertex(2)->point();
|
||||
|
||||
Bounded_side cp1 = side_of_segment_2(p, p2, p3);
|
||||
|
||||
sides[0] = cp1;
|
||||
if (cp1 == ON_BOUNDARY) {
|
||||
return ON_BOUNDARY;
|
||||
}
|
||||
|
||||
Bounded_side cp2 = side_of_segment_2(p, p3, p1);
|
||||
|
||||
sides[1] = cp2;
|
||||
if (cp2 == ON_BOUNDARY) {
|
||||
return ON_BOUNDARY;
|
||||
}
|
||||
|
||||
Bounded_side cp3 = side_of_segment_2(p, p1, p2);
|
||||
|
||||
sides[2] = cp3;
|
||||
if (cp3 == ON_BOUNDARY) {
|
||||
return ON_BOUNDARY;
|
||||
}
|
||||
|
||||
Bounded_side cs1 = side_of_segment_2(p1, p2, p3);
|
||||
Bounded_side cs2 = side_of_segment_2(p2, p3, p1);
|
||||
Bounded_side cs3 = side_of_segment_2(p3, p1, p2);
|
||||
|
||||
// Cannot be on the boundary here.
|
||||
if (cs1 != cp1 || cs2 != cp2 || cs3 != cp3) {
|
||||
return ON_UNBOUNDED_SIDE;
|
||||
} else {
|
||||
return ON_BOUNDED_SIDE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
Bounded_side side_of_segment_2(const Point_2 query, const Point_2 p, const Point_2 q) const {
|
||||
|
||||
// Check first if the points are collinear with the origin
|
||||
Circle_2 poincare(Point_2(FT(0),FT(0)), FT(1));
|
||||
Orientation ori = orientation(poincare.center(), p, q);
|
||||
if (ori == COLLINEAR) {
|
||||
Euclidean_line_2 seg(p, q);
|
||||
Orientation qori = orientation(query, p, q);
|
||||
if (qori == COLLINEAR) {
|
||||
return ON_BOUNDARY;
|
||||
} else {
|
||||
// It is sufficient that these are consistent.
|
||||
if (qori == LEFT_TURN) {
|
||||
return ON_BOUNDED_SIDE;
|
||||
} else {
|
||||
return ON_UNBOUNDED_SIDE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Compute_circle_orthogonal comp;
|
||||
Circle_2 supp = comp(Circle_2(p, FT(0)), Circle_2(q, FT(0)), poincare);
|
||||
return supp.bounded_side(query);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
Side_of_hyperbolic_face_2
|
||||
side_of_hyperbolic_face_2_object() const {
|
||||
return Side_of_hyperbolic_face_2();
|
||||
}
|
||||
|
||||
/****************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
Hyperbolic_Delaunay_triangulation_traits_2() {}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue