add Less_x_2 and Less_y_2 in the traits concept and its models

this is needed to use the spatial sorting
This commit is contained in:
Sébastien Loriot 2013-07-02 11:57:02 +02:00
parent 4978619e1b
commit 2fb80f6520
3 changed files with 47 additions and 0 deletions

View File

@ -148,6 +148,18 @@ represented by the sites `s1` and `s2`.
*/ */
typedef unspecified_type Compare_y_2; 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 A predicate object type. Must
provide `Orientation operator()(Site_2 s1, Site_2 s2, Site_2 s3)`, which performs the provide `Orientation operator()(Site_2 s1, Site_2 s2, Site_2 s3)`, which performs the
@ -305,6 +317,16 @@ Compare_y_2 compare_y_2_object();
/*! /*!
*/
Less_x_2 less_x_2_object();
/*!
*/
Less_y_2 less_y_2_object();
/*!
*/ */
Orientation_2 orientation_2_object(); Orientation_2 orientation_2_object();

View File

@ -335,6 +335,9 @@ public:
FK_Is_degenerate_edge_2, C2E, C2F> FK_Is_degenerate_edge_2, C2E, C2F>
Is_degenerate_edge_2; Is_degenerate_edge_2;
typedef typename CK::Less_x_2 Less_x_2;
typedef typename CK::Less_y_2 Less_y_2;
private: private:
typedef typedef
Filtered_predicate<EK_Arrangement_type_2, FK_Arrangement_type_2, C2E, C2F> Filtered_predicate<EK_Arrangement_type_2, FK_Arrangement_type_2, C2E, C2F>
@ -448,6 +451,16 @@ public:
oriented_side_2_object() const { oriented_side_2_object() const {
return Oriented_side_2(); 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();
}
}; };

View File

@ -171,6 +171,9 @@ public:
CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Oriented_side_C2<K,MTag> CGAL_SEGMENT_DELAUNAY_GRAPH_2_NS::Oriented_side_C2<K,MTag>
Oriented_side_2; Oriented_side_2;
typedef typename R::Less_x_2 Less_x_2;
typedef typename R::Less_y_2 Less_y_2;
public: public:
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
// ACCESS TO OBJECTS // ACCESS TO OBJECTS
@ -264,6 +267,15 @@ public:
return Oriented_side_2(); 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 } //namespace CGAL