CGAL 5.5.2 - 2D Arrangements
CGAL::Arr_polyline_traits_2< SegmentTraits_2 >::Curve_2 Class Reference

#include <CGAL/Arr_polyline_traits_2.h>

Definition

The Curve_2 type nested within the traits class respresnts polylines.

Public Types

typedef std::vector< X_monotone_segment_2 >::const_iterator Segment_const_iterator
 Const iterator of subcurves.
 
typedef std::reverse_iterator< Segment_const_iteratorSegment_const_reverse_iterator
 Reverse const iterator of subcurves.
 

Public Member Functions

 Curve_2 ()
 constructs default.
 
 Curve_2 (const Segment_2 &seg)
 constructs from a subcurve.
 
template<typename InputIterator >
void Curve_2 (InputIterator begin, InputIterator end)
 constructs a polyline from a range of subcurves. More...
 
Segment_const_iterator begin_segments () const
 obtains an iterator for the polycurve subcurves.
 
Segment_const_iterator end_segments () const
 obtains a past-the-end iterator for the polycurve subcurves.
 
Segment_const_reverse_iterator rbegin_segments () const
 obtains the first reverse iterator of the polyline subcurves.
 
Segment_const_reverse_iterator rend_segments () const
 obtains the past-the-end reverse iterator for the polyline points.
 
Segments_size_type number_of_segments () const
 Obtain the number of subcurves that comprise the poyline. More...
 

Constructor & Destructor Documentation

◆ Curve_2()

template<typename SegmentTraits_2 >
template<typename InputIterator >
void CGAL::Arr_polyline_traits_2< SegmentTraits_2 >::Curve_2::Curve_2 ( InputIterator  begin,
InputIterator  end 
)

constructs a polyline from a range of subcurves.

Parameters
beginAn iterator pointing to the first subcurve in the range.
endAn iterator pointing after the past-the-end subcurve in the range.
Precondition
The end of subcurve n should be the beginning of subcurve n+1.

Member Function Documentation

◆ number_of_segments()

template<typename SegmentTraits_2 >
Segments_size_type CGAL::Arr_polyline_traits_2< SegmentTraits_2 >::Curve_2::number_of_segments ( ) const

Obtain the number of subcurves that comprise the poyline.

Returns
The number of subcurves.