diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h index 4918683b6b7..79103211ffd 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h @@ -1657,12 +1657,14 @@ protected: } inline Oriented_side - oriented_side(const Storage_site_2& q, const Storage_site_2& supp, + oriented_side(const Storage_site_2& s1, const Storage_site_2& s2, + const Storage_site_2& supp, const Storage_site_2& p) const { - CGAL_precondition( q.is_point() && supp.is_segment() && p.is_point() ); + CGAL_precondition( supp.is_segment() && p.is_point() ); return - geom_traits().oriented_side_2_object()(q.site(), supp.site(), p.site()); + geom_traits().oriented_side_2_object()( + s1.site(), s2.site(), supp.site(), p.site()); } inline Oriented_side @@ -1869,10 +1871,11 @@ protected: } inline Oriented_side - oriented_side(const Site_2& q, const Site_2& supp, const Site_2& p) const + oriented_side(const Site_2& s1, const Site_2&s2, + const Site_2& supp, const Site_2& p) const { - CGAL_precondition( q.is_point() && supp.is_segment() && p.is_point() ); - return geom_traits().oriented_side_2_object()(q, supp, p); + CGAL_precondition( supp.is_segment() && p.is_point() ); + return geom_traits().oriented_side_2_object()(s1, s2, supp, p); } inline Oriented_side diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h index 1dd0fde727c..80f55ac41b5 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Oriented_side_C2.h @@ -60,6 +60,19 @@ public: typedef Oriented_side result_type; typedef Site_2 argument_type; + // computes the oriented side of the Voronoi vertex of s1, s2, inf + // wrt the line that passes through the point p and its direction + // is the direction of the supporting line of s, rotated by 90 + // degrees counterclockwise. + Oriented_side operator()(const Site_2& s1, const Site_2& s2, + const Site_2& s, const Site_2& p) const + { + CGAL_precondition(s1.is_point() or s2.is_point()); + CGAL_precondition(s1.is_segment() or s2.is_segment()); + + return this->operator()((s1.is_point()? s1: s2), s, p); + } + // computes the oriented side of the point q // wrt the line that is passes through the point p and its direction // is the direction of the supporting line of s, rotated by 90 diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h index 12eef09d243..247470037f0 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h @@ -527,13 +527,13 @@ find_faces_to_split(const Vertex_handle& v, const Site_2& t) const CGAL_assertion( !is_infinite( ff1->vertex(ccw_v) ) ); CGAL_assertion( ff1->vertex(ccw_v)->site().is_point() ); sv_ep = ff1->vertex(ccw_v)->site(); + os1 = oriented_side(v->site(), sv_ep, sitev_supp, t); } else { CGAL_assertion( !is_infinite( ff1->vertex( cw_v) ) ); CGAL_assertion( ff1->vertex( cw_v)->site().is_point() ); sv_ep = ff1->vertex( cw_v)->site(); + os1 = oriented_side(sv_ep, v->site(), sitev_supp, t); } - - os1 = oriented_side(sv_ep, sitev_supp, t); } else { os1 = oriented_side(fc1->vertex(0)->site(), fc1->vertex(1)->site(), @@ -551,13 +551,13 @@ find_faces_to_split(const Vertex_handle& v, const Site_2& t) const CGAL_assertion( !is_infinite( ff2->vertex(ccw_v) ) ); CGAL_assertion( ff2->vertex(ccw_v)->site().is_point() ); sv_ep = ff2->vertex(ccw_v)->site(); + os2 = oriented_side(v->site(), sv_ep, sitev_supp, t); } else { CGAL_assertion( !is_infinite( ff2->vertex( cw_v) ) ); CGAL_assertion( ff2->vertex( cw_v)->site().is_point() ); sv_ep = ff2->vertex( cw_v)->site(); + os2 = oriented_side(sv_ep, v->site(), sitev_supp, t); } - - os2 = oriented_side(sv_ep, sitev_supp, t); } else { os2 = oriented_side(fc2->vertex(0)->site(), fc2->vertex(1)->site(),