pub fn polygons_intersection_points(
    poly1: &[Point2<Real>],
    poly2: &[Point2<Real>]
) -> Result<Vec<Vec<Point2<Real>>>, PolygonsIntersectionError>
Expand description

Compute intersections between two polygons that may be non-convex but that must not self-intersect.

The input polygons are assumed to not self-intersect, and to be oriented counter-clockwise.

The resulting polygon is output vertex-by-vertex to the out closure. If two None are given to the out closure, then one connected component of the intersection polygon is complete.

If the polygons are known to be convex, use convex_polygons_intersection_points instead for better performances.