CGAL 6.1 - 2D Arrangements

Loading...
Searching...
No Matches
List of all members
CGAL::Arr_polyline_traits_2< SegmentTraits_2 >::Push_back_2 Class Reference

`#include <CGAL/Arr_polyline_traits_2.h>`

## Definition

template<typename SegmentTraits_2>
class CGAL::Arr_polyline_traits_2< SegmentTraits_2 >::Push_back_2

Functor to augment a polyline by either adding a vertex or a segment at the back.

## Operations
void | operator() (Curve_2 &cv, const Point_2 &p) const
| appends a point `p` to an existing polyline `cv` at the back.
void | operator() (Curve_2 &cv, const Segment_2 &seg) const
| appends a segment `seg` to an existing polyline `cv` at the back.
void | operator() (const X_monotone_curve_2 &xcv, Point_2 &p) const
| appends a point `p` to an existing \(x\)-monotone polyline `xcv` at the back.
void | operator() (const X_monotone_curve_2 &xcv, Segment_2 &seg) const
| appends a segment `seg` to an existing \(x\)-monotone polyline `xcv` at the back.

## Member Function Documentation

## ◆ operator()() [1/4]

template<typename SegmentTraits_2 >

void CGAL::Arr_polyline_traits_2< SegmentTraits_2 >::Push_back_2::operator() | ( | const X_monotone_curve_2 & | xcv,
|  | Point_2 & | p
| ) |  | const

appends a point `p` to an existing \(x\)-monotone polyline `xcv` at the back.

Parameters

  xcv | the existing \(x\)-monotone polyline
  p | the point to be pushed back.

Precondition
  `xcv` contains at least one segment
  `p` is either to the right of `xcv` if it is oriented left-to-right or it is to its left if `xcv` is oriented right-to-left.

## ◆ operator()() [2/4]

template<typename SegmentTraits_2 >

void CGAL::Arr_polyline_traits_2< SegmentTraits_2 >::Push_back_2::operator() | ( | const X_monotone_curve_2 & | xcv,
|  | Segment_2 & | seg
| ) |  | const

appends a segment `seg` to an existing \(x\)-monotone polyline `xcv` at the back.

If `xcv` is empty, `seg` will be its first segment.

Parameters

  xcv | existing \(x\)-monotone polyline
  seg | the segment to be added

Precondition
  If `xcv` is not empty then `seg` extends `xcv` to the right if `xcv` is oriented right-to-left. Otherwise, `seg` extends `xcv` to the left.
  `seg` is not degenerated.
  `xcv` and `seg` should have the same orientation

## ◆ operator()() [3/4]

template<typename SegmentTraits_2 >

void CGAL::Arr_polyline_traits_2< SegmentTraits_2 >::Push_back_2::operator() | ( | Curve_2 & | cv,
|  | const Point_2 & | p
| ) |  | const

appends a point `p` to an existing polyline `cv` at the back.

Parameters

  cv | a polyline. Note, `cv` is not (necessarily) \(x\)-monotone.
  p | a point to be appended to `cv` at the back.

Precondition
  `cv` contains at least one segment.

## ◆ operator()() [4/4]

template<typename SegmentTraits_2 >

void CGAL::Arr_polyline_traits_2< SegmentTraits_2 >::Push_back_2::operator() | ( | Curve_2 & | cv,
|  | const Segment_2 & | seg
| ) |  | const

appends a segment `seg` to an existing polyline `cv` at the back.

If `cv` is empty, `seg` will be its first segment.

Parameters

  cv | a polyline. Note, `cv` is (not necessarily) \(x\)-monotone.
  seg | a segment (not necessarily \(x\)-monotone) to be appended to `cv`