CGAL 6.1.1 - 2D Arrangements

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

`#include <CGAL/Arr_circle_segment_traits_2.h>`

## Definition

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

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
| X_monotone_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.
| X_monotone_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`.
| X_monotone_curve_2 (const typename Kernel::Circle_2 &circ, const Point_2 &source, const Point_2 &target, Orientation orient)
| 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.

## Access Functions
const Point_2 & | source () const
| returns the source point of `xcv`.
const Point_2 & | target () const
| returns the target point of `xcv`.
bool | is_directed_right () const
| returns true if `xcv` is directed right, false otherwise.
const Point_2 & | left () const
| returns the left (lexicographically smaller) endpoint of `xcv`.
const Point_2 & | right () const
| returns the right (lexicographically larger) endpoint of `xcv`.
Orientation | orientation () const
| returns the orientation of the curve (`COLLINEAR` in case of line segments).
bool | is_linear () const
| determines whether `xcv` is a line segment.
bool | is_circular () const
| determines whether `xcv` is a circular arc.
Kernel::Line_2 | supporting_line () const
| returns the supporting line of `xcv`.
Kernel::Circle_2 | supporting_circle () const
| returns the supporting circle of `xcv`.
Bbox_2 | bbox () const
| returns a bounding box of the arc `xcv`.

## Constructor & Destructor Documentation

## ◆ X_monotone_curve_2() [1/2]

template<typename Kernel >

CGAL::Arr_circle_segment_traits_2< Kernel >::X_monotone_curve_2::X_monotone_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.

## ◆ X_monotone_curve_2() [2/2]

template<typename Kernel >

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

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 determined by `orient`.

Precondition
  Both endpoints must lie on the given supporting circle.
  The circular arc is \(x\)-monotone.

## Member Function Documentation

## ◆ supporting_circle()

template<typename Kernel >

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

returns the supporting circle of `xcv`.

Precondition
  `xcv` is a circular arc.

## ◆ supporting_line()

template<typename Kernel >

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

returns the supporting line of `xcv`.

Precondition
  `xcv` is a line segment.