From 2fb80f6520cb65fd890ff17bc19d21268d2df9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 2 Jul 2013 11:57:02 +0200 Subject: [PATCH] add Less_x_2 and Less_y_2 in the traits concept and its models this is needed to use the spatial sorting --- .../Concepts/SegmentDelaunayGraphTraits_2.h | 22 +++++++++++++++++++ .../Filtered_traits_base_2.h | 13 +++++++++++ .../Segment_Delaunay_graph_2/Traits_base_2.h | 12 ++++++++++ 3 files changed, 47 insertions(+) diff --git a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphTraits_2.h b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphTraits_2.h index 12462a5bbf0..0ae1f14c413 100644 --- a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphTraits_2.h +++ b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphTraits_2.h @@ -148,6 +148,18 @@ represented by the sites `s1` and `s2`. */ typedef unspecified_type Compare_y_2; +/*! +A predicate object type. Must +provide `bool operator()(Point_2 p1, Point_2 p2)`, which returns `true` if `p1.x() < p2.x()`. +*/ +typedef unspecified_type Less_x_2; + +/*! +A predicate object type. Must +provide `bool operator()(Point_2 p1, Point_2 p2)`, which returns `true` if `p1.y() < p2.y()`. +*/ +typedef unspecified_type Less_y_2; + /*! A predicate object type. Must provide `Orientation operator()(Site_2 s1, Site_2 s2, Site_2 s3)`, which performs the @@ -303,6 +315,16 @@ Compare_x_2 compare_x_2_object(); */ Compare_y_2 compare_y_2_object(); +/*! + +*/ +Less_x_2 less_x_2_object(); + +/*! + +*/ +Less_y_2 less_y_2_object(); + /*! */ diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h index 0bb53abc90c..4bf7eb18130 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Filtered_traits_base_2.h @@ -335,6 +335,9 @@ public: FK_Is_degenerate_edge_2, C2E, C2F> Is_degenerate_edge_2; + typedef typename CK::Less_x_2 Less_x_2; + typedef typename CK::Less_y_2 Less_y_2; + private: typedef Filtered_predicate @@ -448,6 +451,16 @@ public: oriented_side_2_object() const { return Oriented_side_2(); } + + Less_x_2 + less_x_2_object() const { + return Less_x_2(); + } + + Less_y_2 + less_y_2_object() const { + return Less_y_2(); + } }; diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h index 04f7ef6b473..8c819ae4ab5 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Traits_base_2.h @@ -171,6 +171,9 @@ public: CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Oriented_side_C2 Oriented_side_2; + typedef typename R::Less_x_2 Less_x_2; + typedef typename R::Less_y_2 Less_y_2; + public: //----------------------------------------------------------------------- // ACCESS TO OBJECTS @@ -264,6 +267,15 @@ public: return Oriented_side_2(); } + Less_x_2 + less_x_2_object() const { + return Less_x_2(); + } + + Less_y_2 + less_y_2_object() const { + return Less_y_2(); + } }; } //namespace CGAL