CGAL 6.1 - 2D Arrangements

Loading...
Searching...
No Matches
List of all members
CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2 Class Reference

`#include <CGAL/Arr_circle_segment_traits_2.h>`

## Definition

template<typename Kernel>
class CGAL::Arr_circle_segment_traits_2< Kernel >::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.

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`.
| Curve_2 (const typename Kernel::Circle_2 &circ)
| constructs an curve corresponding to the given circle.
| 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.
| 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.
| 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`.

## Access Functions
bool | is_full () const
| indicates whether the curve represents a full circle.
const Point_2 & | source () const
| returns the source point.
const Point_2 & | target () const
| returns the target point.
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`.
Kernel::Circle_2 | supporting_circle () const
| returns the supporting circle of `cv`.

## Constructor & Destructor Documentation

## ◆ Curve_2() [1/5]

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.

## ◆ Curve_2() [2/5]

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.

## ◆ Curve_2() [3/5]

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.

## ◆ Curve_2() [4/5]

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.

## ◆ Curve_2() [5/5]

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

## ◆ source()

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.

## ◆ supporting_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.

## ◆ supporting_line()

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.

## ◆ target()

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.