From d2d8afba8cdea0e2a9aef4b9ab0ce147306da4ee Mon Sep 17 00:00:00 2001 From: Panagiotis Cheilaris Date: Fri, 6 Jun 2014 11:11:04 +0200 Subject: [PATCH] hvseg_coord: compute constant coordinate new function hvseg_coord: compute constant coordinate of an axis-parallel segment Signed-off-by: Panagiotis Cheilaris --- .../Basic_predicates_C2.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h index bd3d3b9ddb0..598230aee79 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h @@ -1163,6 +1163,16 @@ public: return s.supporting_site().source_site().point().x(); } + inline + static + RT hvseg_coord(const Site_2 & s, const bool is_hor) { + CGAL_assertion(s.is_segment()); + CGAL_assertion(is_site_horizontal(s) == is_hor); + CGAL_assertion(is_site_vertical(s) == (not is_hor)); + return is_hor ? s.supporting_site().source_site().point().y() : + s.supporting_site().source_site().point().x() ; + } + };