All convex hull and extreme point algorithms provided in CGAL are parameterized with a traits class Traits, which defines the primitives (objects and predicates) that the convex hull algorithms use. ConvexHullTraits_2 defines the complete set of primitives required in these functions. The specific subset of these primitives required by each function is specified with each function.
| |
The point type on which the convex hull functions operate.
| |
| |
Binary predicate object type comparing Point_2s. Must provide
bool operator()(Point_2 p, Point_2 q) where true
is returned iff , false otherwise.
| |
| |
Binary predicate object type comparing 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 and coordinate of point ,
respectively.
| |
| |
Same as Less_xy_2 with the roles of and interchanged.
| |
| |
Predicate object type that must provide
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 must provide
bool operator()(Point_2 p, Point_2 q, Point_2 r,Point_2 s), which returns true iff
the signed distance from to the line through and
is smaller than the distance from to . It is used to
compute the point right of a line with maximum unsigned distance to
the line. The predicate must provide a total order compatible
with convexity, i.e., for any line segment one of the
endpoints
of is the smallest point among the points on , with respect to
the order given by Less_signed_distance_to_line_2.
| |
| |
Predicate object type that must provide
bool operator()(Point_2 e, Point_2 p,Point_2 q),
where true is returned iff a tangent at to the point set
hits before when rotated counterclockwise around
.
Ties are broken such that the point with larger distance to
is smaller!
|
Only a copy constructor is required.
|
The following member functions to create instances of the above predicate object types must exist.
|
| |
|
| |
|
| |
| ||
| ||
|
| |
|
|
CGAL::Convex_hull_constructive_traits_2<R>
CGAL::Convex_hull_projective_xy_traits_2<Point_3>
CGAL::Convex_hull_projective_xz_traits_2<Point_3>
CGAL::Convex_hull_projective_yz_traits_2<Point_3>
CGAL::Convex_hull_traits_2<R>