Function parry3d::utils::point_in_poly2d
source · pub fn point_in_poly2d(pt: &Point2<Real>, poly: &[Point2<Real>]) -> bool
Expand description
Tests if the given point is inside an arbitrary closed polygon with arbitrary orientation, using a counting winding strategy.
The polygon is assumed to be closed, i.e., first and last point of the polygon are implicitly assumed to be connected by an edge.
This handles concave polygons. For a function dedicated to convex polygons, see point_in_convex_poly2d
.