PolygonTraits_2

Definition

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.

Types

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.

Creation

A default constructor and copy constructor are required.

Operations

The following functions that create instances of the above predicate object types must exist.

Equal_2 traits.equal_2_object ()

Less_xy_2 traits.less_xy_2_object ()

Less_yx_2 traits.less_yx_2_object ()

Compare_y_2 traits.compare_y_2_object ()

Compare_x_2 traits.compare_x_2_object ()

Orientation_2 traits.orientation_2_object ()

Compute_area_2 traits.compute_area_2_object ()

Construct_segment_2
traits.construct_segment_2_object ()

Has Models

The kernels supplied by CGAL are models of PolygonTraits_2.

See Also

CGAL::Polygon_2<PolygonTraits_2, Container>