The Polygon_2 class and the functions that implement the functionality found in that class each are parameterized by a traits class that defines the primitives used in the algorithms. The concept PolygonTraits_2 defines this common set of requirements.
The requirements of PolygonTraits_2 are a subset of the kernel requirements. We only list the types and methods which are required and refer to the description of the kernel concept for details.
PolygonTraits_2::FT | |
PolygonTraits_2::Point_2 | |
The point type.
| |
PolygonTraits_2::Segment_2 | |
The segment type.
| |
PolygonTraits_2::Construct_segment_2 | |
PolygonTraits_2::Equal_2 | |
PolygonTraits_2::Less_xy_2 | |
PolygonTraits_2::Less_yx_2 | |
PolygonTraits_2::Compare_x_2 | |
PolygonTraits_2::Compare_y_2 | |
PolygonTraits_2::Orientation_2 | |
PolygonTraits_2::Compute_area_2 | |
Computes the signed area of the oriented
triangle defined by 3 Point_2 passed as arguments.
|
A default constructor and copy constructor are required.
The following functions that create instances of the above predicate object types must exist.
The kernels supplied by Cgal are models of PolygonTraits_2.
CGAL::Projection_traits_xy_3<K>
CGAL::Projection_traits_yz_3<K>
CGAL::Projection_traits_zx_3<K>
CGAL::Polygon_2<PolygonTraits_2, Container>