CGAL 5.6 - 2D Arrangements
|
#include <CGAL/Arr_circle_segment_traits_2.h>
The class Arr_circle_segment_traits_2
is a model of the ArrangementTraits_2
concept and can be used to construct and maintain arrangements of circular arcs and line segments.
The traits class must be instantiated with a geometric kernel, such that the supporting circles of the circular arcs are of type Kernel::Circle_2
and the supporting lines of the line segments are of type Kernel::Line_2
. Thus, the coordinates of the center of supporting circles, and its squared radius are of type Kernel::FT
, which should be an exact rational number-type; similarly, the coefficients of each supporting line \( ax + by + c = 0\) are also of type Kernel::FT
. Note however that the intersection point between two such arcs do not have rational coordinates in general. For this reason, we do not require the endpoints of the input arcs and segments to have rational coordinates.
The nested Point_2
type defined by the traits class is therefore different than the Kernel::Point_2
type. Its coordinates are of type CoordNT
, which an instantiation of Sqrt_extension<NT,ROOT>
where NT = ROOT = Kernel::FT
. Moreover, the third and fourth (hidden) template parameters of Sqrt_extension<NT,ROOT>
are set to CGAL::Tag_true
, which enables efficient comparison among different extensions.
For more details see the documentation of Sqrt_extension<NT,ROOT>
.
While Arr_circle_segment_traits_2
models the concept ArrangementDirectionalXMonotoneTraits_2
, the implementation of the Are_mergeable_2
operation does not enforce the input curves to have the same direction as a precondition. Moreover, Arr_circle_segment_traits_2
supports the merging of curves of opposite directions.
Classes | |
class | Curve_2 |
The Curve_2 class nested within the traits class can represent arbitrary circular arcs, full circles and line segments and support their construction in various ways. More... | |
class | Point_2 |
The Point_2 number-type nested within the traits class represents a Cartesian point whose coordinates are algebraic numbers of type CoordNT . More... | |
class | Trim_2 |
class | X_monotone_curve_2 |
The X_monotone_curve_2 class nested within the traits class can represent \( x\)-monotone and line segments (which are always weakly \(x\)-monotone). More... | |