CGAL::do_intersect

Definition

The function do_intersect checks if a given curve or x-monotone curve intersects an existing arrangement's edges or vertices.

If the give curve is not an x-monotone curve then the function subdivides the given curve into x-monotone subcurves and isolated vertices . Each subcurve is in turn checked for intersection. The function uses the zone algorithm to check if the curve intersects the arrangement. First, the curve's left endpoint is located. Then, its zone is computed starting from its left endpoint location. The zone computation terminates when an intersection with an arrangement's edge/vertex is found or when the right endpoint is reached.

A given point-location object is used for locating the left endpoint of the given curve in the existing arrangement. 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 <class GeomTraits, class TopTraits, class Curve, class PointLocation>
bool do_intersect ( Arrangement_on_surface_2<GeomTraits, TopTraits>& arr, Curve c, PointLocation pl)
Checks if the given curve or x-monotone curve c intersects edges or vertices of the existing arrangement arr.

Precondition

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

Requirements