The Sweep_line_2 class is implemented in such a way that no assumptions are made regarding the given curves. For example, the curves may be overlapping or vertical. There is also no assumtion that the curves are x-monotone.
The Sweep_line_2 is parametrized by two parameters. The input iterator and the traits parameter. The CurveInputIterator::type_value is equivalent to Traits::Curve_2.
#include <CGAL/Sweep_line_2.h>
| |||
constructs an instance of the Sweep_line_2 class.
| |||
| |||
constructs an instance of the Sweep_line_2 class.
|
| |
traits class.
| |
| |
a 2D curve as defined in the traits class.
| |
| |
an x-monotone 2D curve as defined in the traits class.
| |
| |
a 2D point as defined in the traits class.
|
| ||||
|
| |||
given a range of curves, this method returns a container of
interior-disjoint curves that are the product of intersecting
the specified curves. The overlapping parameter is an input parameter and is relevant only in case there are overlapping curves in the input. If this parameter is false (default), any overlapping subcurve is reported only once. If the parameter is set to true, the subcurve is reported as many times as it is overlapped. OutpoutIterator::value_type is equvalent to Traits::X_monotone_curve_2. | ||||
| ||||
|
| |||
given a range of curves, this method returns a list of all intersection
points of the curves. If endpoints is true (default) the end points of the curves are reported as intersection points. Otherwise they are ommited. The overlapping parameter is an input parameter and is relevant only in case there are overlapping curves in the input. If this parameter is false (default), any overlapping subcurve is reported only once. If the parameter is set to true, the subcurve is reported as many times as it is overlapped. The OutputIterator::value_type is equivalent to Traits::Point_2. | ||||
| ||||
|
| |||
given a range of curves this method calculates the intersection points
between the curves. It returns the list of intersection points,
and for each intersection point the list of curves intersecting
at that point is given. If endpoints is true (default) the end points of the curves are reported as intersection points. Otherwise they are ommited. The OutputIterator::value_type is equivalent to a pair of Point_2 and a container (e.g., list, vector) of Curve_2. | ||||
|
| |||
given a range of curves this method returns true if any two curves intersect, false otherwise. |