From 2ee4a00a6886c5a63c00a24bf7bcd2b898c9abd0 Mon Sep 17 00:00:00 2001 From: Panagiotis Cheilaris Date: Sat, 13 Apr 2013 19:14:11 +0200 Subject: [PATCH] move bisector SS computation common points earlier Signed-off-by: Panagiotis Cheilaris --- .../Bisector_Linf.h | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h index 4c0da8fdeee..7b7ef5129f2 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h @@ -369,6 +369,21 @@ private: // another precondition: // p, q may be parallel but do not have the same supporting line + Are_same_points_2 are_same_points; + + bool is_psrc_qsrc = + are_same_points(p.source_site(), q.source_site()); + bool is_psrc_qtrg = + are_same_points(p.source_site(), q.target_site()); + bool is_mid_psrc = is_psrc_qsrc or is_psrc_qtrg; + bool is_ptrg_qsrc = + are_same_points(p.target_site(), q.source_site()); + bool is_ptrg_qtrg = + are_same_points(p.target_site(), q.target_site()); + bool is_mid_ptrg = is_ptrg_qsrc or is_ptrg_qtrg; + + bool have_common_endp = is_mid_psrc or is_mid_ptrg; + Are_parallel_2 are_parallel; // compute supporting lines of segments @@ -440,18 +455,6 @@ private: // compute intersection point of two lines Point_2 mid; - Are_same_points_2 are_same_points; - - bool is_psrc_qsrc = - are_same_points(p.source_site(), q.source_site()); - bool is_psrc_qtrg = - are_same_points(p.source_site(), q.target_site()); - bool is_mid_psrc = is_psrc_qsrc or is_psrc_qtrg; - bool is_ptrg_qsrc = - are_same_points(p.target_site(), q.source_site()); - bool is_ptrg_qtrg = - are_same_points(p.target_site(), q.target_site()); - bool is_mid_ptrg = is_ptrg_qsrc or is_ptrg_qtrg; if (is_mid_psrc) { mid = p.source();