dimforge / parry

2D and 3D collision-detection library for Rust.
https://parry.rs
Apache License 2.0
565 stars 100 forks source link

Add point in polygon test using winding counting method #173

Closed kurtlawrence closed 6 months ago

kurtlawrence commented 9 months ago

Fixes #172

Since this method is different to the one defined, namely that it does not short-circuit, I have left the original.

sebcrozet commented 6 months ago

Thanks! I renamed the existing method to point_in_convex_poly2d (since it didn’t handle non-convex polygons anyway), so that your implementation can take the point_in_poly2d name.