\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)

CGAL 4.3 - 2D Arrangements

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Classes
CGAL::Arr_polyline_traits_2< SegmentTraits > Class Template Reference
Traits Classes

`#include <CGAL/Arr_polyline_traits_2.h>`

## Definition

The traits class `Arr_polyline_traits_2` is a model of the `ArrangementTraits_2` concept.

It handles piecewise linear curves, commonly referred to as polylines. Each polyline is a chain of segments, where each two neighboring segments in the chain share a common endpoint. The traits class exploits the functionality of the `SegmentTraits` template-parameter to handle the segments that comprise the polyline curves.

The class instantiated for the template parameter `SegmentTraits` must be a model of the `ArrangementTraits_2` concept that handles line segments (e.g., `Arr_segment_traits_2<Kernel>` or `Arr_non_caching_segment_traits_2<Kernel>`, where the first alternative is recommended).

The number type used by the injected segment traits should support exact rational arithmetic (that is, the number type should support the arithmetic operations \( +\), \( -\), \( \times\) and \( \div\) that should be carried out without loss of precision), in order to avoid robustness problems, although other inexact number types could be used at the user's own risk.

Is Model Of:

  `ArrangementTraits_2`

  `ArrangementLandmarkTraits_2`

See Also
  `Arr_segment_traits_2<Kernel>`
  `Arr_non_caching_segment_traits_2<Kernel>`

Examples:
  Arrangement_on_surface_2/generic_curve_data.cpp, and Arrangement_on_surface_2/polylines.cpp.

## Classes
class | Curve_2
| The `Curve_2` class nested within the polyline traits is used to represent general continuous piecewise-linear curves (a polyline can be self-intersecting) and support their construction from any range of points. More...
class | X_monotone_curve_2
| The `X_monotone_curve_2` class nested within the polyline traits is used to represent \( x\)-monotone piecewise linear curves. More...