The polygon partitioning functions are each parameterized by a traits class that defines the primitives used in the algorithms. Many requirements are common to all traits classes. The concept PartitionTraits_2 defines this common set of requirements.
| |
The point type on which the partitioning algorithm operates.
| |
| |
The polygon type to be created by the partitioning
algorithm. For testing the validity postcondition of the partition, this
type should provide a nested type Vertex_const_iterator that is the
type of the iterator over the polygon vertices and member functions
Vertex_const_iterator vertices_begin() and
Vertex_const_iterator vertices_end().
|
| |
Predicate object type that compares Point_2s lexicographically.
Must provide bool operator()(Point_2 p, Point_2 q) where true
is returned iff .
We have , iff or and ,
where and denote the and coordinates of point ,
respectively.
| |
| |
Same as Less_xy_2 with the roles of and interchanged.
| |
| |
Predicate object type that provides
bool operator()(Point_2 p,Point_2 q,Point_2 r), which
returns true iff r lies to the left of the
oriented line through p and q.
| |
| |
Predicate object type that provides
CGAL::Orientation operator()(Point_2 p, Point_2 q, Point_2 r) that
returns CGAL::LEFT_TURN, if lies to the left of the oriented
line defined by and , returns CGAL::RIGHT_TURN if
lies to the right of , and returns CGAL::COLLINEAR if lies
on .
| |
| |
Predicate object type that provides
CGAL::Comparision_result operator()(Point_2 p, Point_2 q) to compare
the values of two points. The operator must return
CGAL::SMALLER if , CGAL::LARGER if and
CGAL::EQUAL if .
| |
| |
The same as Compare_y_2, except that
coordinates are compared instead of .
|
A copy constructor and default constructor are required.
| |
|
The following functions that create instances of the above predicate object types must exist.
CGAL::approx_convex_partition_2
CGAL::greene_approx_convex_partition_2
CGAL::optimal_convex_partition_2
CGAL::y_monotone_partition_2