\( \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.8 - 2D Arrangements

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2 Class Reference

`#include <CGAL/Arr_circle_segment_traits_2.h>`

## Definition

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.

The copy and default constructor as well as the assignment operator are provided. In addition, an `operator<<` for the curves is defined for standard output streams.

## Creation
| Curve_2 (const typename Kernel::Segment_2 &seg)
| constructs an curve corresponding to the line segment `seg`.
| Curve_2 (const typename Kernel::Point_2 &source, const typename Kernel::Point_2 &target)
| constructs an curve corresponding to the line segment directed from `source` to `target`, both having rational coordinates.
| Curve_2 (const typename Kernel::Line_2 &line, const Point_2 &source, const Point_2 &target)
| constructs an curve corresponding to the line segment supported by the given line, directed from `source` to `target`. More...
| Curve_2 (const typename Kernel::Circle_2 &circ)
| constructs an curve corresponding to the given circle. More...
| Curve_2 (const typename Kernel::Point_2 &c, const typename Kernel::FT &r, Orientation orient=COUNTERCLOCKWISE)
| constructs an curve corresponding to a circle centered at the rational point `c` whose radius `r` is rational.
| Curve_2 (const typename Kernel::Circle_2 &circ, const Point_2 &source, const Point_2 &target)
| constructs a circular arc supported by `circ`, which has a center point with rational coordinates and whose squared radius is rational, with the given endpoints. More...
| Curve_2 (const typename Kernel::Point_2 &c, const typename Kernel::FT &r, Orientation orient, const Point_2 &source, const Point_2 &target)
| constructs a circular arc supported by a circle centered at the rational point `c` whose radius `r` is rational, directed from `source` to `target` with the given orientation. More...
| Curve_2 (const typename Kernel::Point_2 &source, const typename Kernel::Point_2 &mid, const typename Kernel::Point_2 &target)
| constructs an circular arc whose endpoints are `source` and `target` that passes through `mid`. More...

## Access Functions
bool | is_full () const
| indicates whether the curve represents a full circle.
const Point_2 & | source () const
| returns the source point. More...
const Point_2 & | target () const
| returns the target point. More...
Orientation | orientation () const
| returns the orientation of the curve (`COLLINEAR` in case of line segments).
bool | is_linear () const
| determines whether `cv` is a line segment.
bool | is_circular () const
| determines whether `cv` is a circular arc.
Kernel::Line_2 | supporting_line () const
| returns the supporting line of `cv`. More...
Kernel::Circle_2 | supporting_circle () const
| returns the supporting circle of `cv`. More...

## Constructor & Destructor Documentation

template<typename Kernel >

CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::Curve_2 | ( | const typename Kernel::Line_2 & | line,
|  | const Point_2 & | source,
|  | const Point_2 & | target
| ) |  |

constructs an curve corresponding to the line segment supported by the given line, directed from `source` to `target`.

Note that the two endpoints may have one-root coordinates.

Precondition
  Both endpoints must lie on the given supporting line.

template<typename Kernel >

CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::Curve_2 | ( | const typename Kernel::Circle_2 & | circ) |  |

constructs an curve corresponding to the given circle.

`circ` has a center point with rational coordinates and its squared radius is rational.

template<typename Kernel >

CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::Curve_2 | ( | const typename Kernel::Circle_2 & | circ,
|  | const Point_2 & | source,
|  | const Point_2 & | target
| ) |  |

constructs a circular arc supported by `circ`, which has a center point with rational coordinates and whose squared radius is rational, with the given endpoints.

The orientation of the arc is the same as the orientation of `circ`.

Precondition
  Both endpoints must lie on the given supporting circle.

template<typename Kernel >

CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::Curve_2 | ( | const typename Kernel::Point_2 & | c,
|  | const typename Kernel::FT & | r,
|  | Orientation | orient,
|  | const Point_2 & | source,
|  | const Point_2 & | target
| ) |  |

constructs a circular arc supported by a circle centered at the rational point `c` whose radius `r` is rational, directed from `source` to `target` with the given orientation.

Precondition
  Both endpoints must lie on the supporting circle.

template<typename Kernel >

CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::Curve_2 | ( | const typename Kernel::Point_2 & | source,
|  | const typename Kernel::Point_2 & | mid,
|  | const typename Kernel::Point_2 & | target
| ) |  |

constructs an circular arc whose endpoints are `source` and `target` that passes through `mid`.

All three points have rational coordinates.

Precondition
  The three points must not be collinear.

## Member Function Documentation

template<typename Kernel >

const Point_2& CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::source | ( | ) |  | const

returns the source point.

Precondition
  `cv` is not a full circle.

template<typename Kernel >

Kernel::Circle_2 CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::supporting_circle | ( | ) |  | const

returns the supporting circle of `cv`.

Precondition
  `cv` is a circular arc.

template<typename Kernel >

Kernel::Line_2 CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::supporting_line | ( | ) |  | const

returns the supporting line of `cv`.

Precondition
  `cv` is a line segment.

template<typename Kernel >

const Point_2& CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::target | ( | ) |  | const

returns the target point.

Precondition
  `cv` is not a full circle.