CGAL 6.1.2 - 2D Arrangements

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

`#include <CGAL/Arr_linear_traits_2.h>`

## Definition

template<typename Kernel>
class CGAL::Arr_linear_traits_2< Kernel >::X_monotone_curve_2

The `X_monotone_curve_2` (and the `Curve_2`) class nested within the linear-traits can represent all types of linear objects.

The class supports the copy and default constructor and the assignment operator. In addition, the `operator<<` and `operator>>` for linear objects are defined for standard output and input streams.

## Types
typedef Kernel::Point_2 | Point_2
typedef Kernel::Segment_2 | Segment_2
typedef Kernel::Ray_2 | Ray_2
typedef Kernel::Line_2 | Line_2

## Creation
| X_monotone_curve_2 (const Segment_2 &seg)
| constructs a line segment.
| X_monotone_curve_2 (const Ray_2 &ray)
| constructs a ray.
| X_monotone_curve_2 (const Line_2 &ln)
| constructs a line.

## Access Functions
bool | is_segment () const
| returns whether `c` is a segment (has two bounded endpoints).
Segment_2 | segment () const
| returns a segment object equivalent to `c`.
bool | is_ray () const
| returns whether `c` is a ray (has a bounded source point and its other end is unbounded).
Ray_2 | ray () const
| returns a ray object equivalent to `c`.
bool | is_line () const
| returns whether `c` is a line (has only unbounded ends).
Line_2 | line () const
| returns a line object equivalent to `c`.
Line_2 | supporting_line () const
| returns the supporting line of `c`.
Point_2 | source () const
| returns `c`'s source point.
Point_2 | target () const
| returns `c`'s target point.

## Member Function Documentation

## ◆ line()

template<typename Kernel >

Line_2 CGAL::Arr_linear_traits_2< Kernel >::X_monotone_curve_2::line | ( |  | ) | const

returns a line object equivalent to `c`.

Precondition
  `c` is a line.

## ◆ ray()

template<typename Kernel >

Ray_2 CGAL::Arr_linear_traits_2< Kernel >::X_monotone_curve_2::ray | ( |  | ) | const

returns a ray object equivalent to `c`.

Precondition
  `c` is a ray.

## ◆ segment()

template<typename Kernel >

Segment_2 CGAL::Arr_linear_traits_2< Kernel >::X_monotone_curve_2::segment | ( |  | ) | const

returns a segment object equivalent to `c`.

Precondition
  `c` is a segment.

## ◆ source()

template<typename Kernel >

Point_2 CGAL::Arr_linear_traits_2< Kernel >::X_monotone_curve_2::source | ( |  | ) | const

returns `c`'s source point.

Precondition
  `c` is a point, a segment or a ray.

## ◆ supporting_line()

template<typename Kernel >

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

returns the supporting line of `c`.

Precondition
  `c` is not a point (a degenerate curve).

## ◆ target()

template<typename Kernel >

Point_2 CGAL::Arr_linear_traits_2< Kernel >::X_monotone_curve_2::target | ( |  | ) | const

returns `c`'s target point.

Precondition
  `c` is a point or a segment.