CGAL::insert_curve

Definition

The function insert_curve inserts a given curve into a given arrangement, where no restrictions are made on the nature of the inserted curve. It subdivides the given curve into x-monotone subcurves. Each subcurve is in turn inserted into the arrangement by locating its left endpoint and computing its zone until reaching the right endpoint.

A given point-location object is used for answering point-location queries during the insertion process. By default, the function uses the ``walk along line'' point-location strategy - namely an instance of the class Arr_walk_along_line_point_location<Arrangement_2<Traits,Dcel> >.

#include <CGAL/Arrangement_2.h>

template<typename Traits, typename Dcel, typename PointLocation>
void
insert_curve ( Arrangement_2<Traits,Dcel>& arr,
typename Traits::Curve_2 c,
PointLocation pl = walk_pl)
Inserts the given curve c into the arrangement arr.

Precondition

If provided, pl must be attached to the given arrangement arr.

#include <CGAL/Arrangement_with_history_2.h>

template<typename Traits, typename Dcel, typename PointLocation>
typename Arrangement_with_history_2<Traits,Dcel>::Curve_handle
insert_curve ( Arrangement_with_history_2<Traits,Dcel>& arr,
typename Traits::Curve_2 c,
PointLocation pl = walk_pl)
Inserts the given curve c into the arrangement with history arr, and returns a handle to the inserted curve.

Precondition

If provided, pl is attached to the given arrangement arr.

Requirements