template<typename SubcurveTraits_2>
template<typename SubcurveType_2, typename PointType_2>
class CGAL::Arr_polycurve_traits_2< SubcurveTraits_2 >::Curve_2< SubcurveType_2, PointType_2 >
The Curve_2
type nested in the Arr_polycurve_traits_2
represents general continuous piecewise-linear subcurves (a polycurve can be self-intersecting) and support their construction from range of subcurves.
Construction of polycurves in various ways is supported using the construction functors. It is strongly recommended to avoid construction of Curve_2
objects directly and prefer the usage of the construction functors. The type Curve_2
has two template parameters, namely SubcurveType_2
and PointType_2
, which are SubcurveTraits_2::Curve_2
and SubcurveTraits_2::Point_2
types. Thus, in general, the subcurves that a Curve_2
instance comprises could be either \(x\)-monotone or not!
The copy and default constructor as well as the assignment operator are provided for polycurve subcurves. In addition, an operator<<
for the subcurves is defined for standard output streams, and an operator>>
for the subcurves is defined for standard input streams.
template<typename SubcurveTraits_2>
template<typename SubcurveType_2 , typename PointType_2 >
template<typename InputIterator >
Construct a polycurve defined by the given range of subcurves [first, last)
(the value-type of InputIterator
must be SubcurveTraits_2::Curve_2
.
In general, the subcurves might not be \(x\)-monotone, furthermore, they might not form a continuous polycurve.
- Precondition
- The subcurves in the range should form a continuous and well-oriented polycurve.
- Deprecated:
- For backwards compatibility, it is possible to call this constructor with a range whose value-type is
SubcurveTraits_2::Point_2
. In this case, the constructed polycurve will concatenate the \(n\)th point with the \((n+1)\)-st point in the range (using a SubcurveTraits_2::Subcurve_2
's). This functionality is deprecated. Instead use the Construct_curve_2
functors.
template<typename SubcurveTraits_2>
template<typename SubcurveType_2 , typename PointType_2 >
- Deprecated:
- Obtain the number of subcurve end-points that comprise the polycurve.
Note that for a bounded polycurve, if there are \( n\) points in the polycurve, it is comprised of \( (n - 1)\) subcurves. Currently, only bounded polycurves are supported.
template<typename SubcurveTraits_2>
template<typename SubcurveType_2 , typename PointType_2 >
Append a subcurve to the polycurve at the back.
Warning: This function does not preform the precondition test that the Push_back_2
functor does. Thus, it is recommended to use the latter.
- Parameters
-
subcurve | The new subcurve to be appended to the polycurve. |
- Precondition
- If the polycurve is not empty, the source of
subcurve
must coincide with the target point of the last subcurve in the polycurve.
template<typename SubcurveTraits_2>
template<typename SubcurveType_2 , typename PointType_2 >
Append a subcurve to the polycurve at the front.
Warning: This is a risky function! Don't use it! Prefer the corresponding functor which is provided in the traits class.
- Parameters
-
subcurve | The new subcurve to be appended to the polycurve. |
- Precondition
- If the polycurve is not empty, the target of
subcurve
must coincide with the source point of the first subcurve in the polycurve.