dimforge / parry

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

feat: implement concave polylines intersection #210

Closed sebcrozet closed 1 week ago

sebcrozet commented 1 week ago

This implements the calculation of the intersection polygon(s) between two non-convex (non-self-intersecting) polygons. Adds an example based on macroquad (for rendering).

https://github.com/dimforge/parry/assets/1734958/e7c61b8a-443a-4436-a300-bb67e73c5291

This also adds an example based on macroquad for the point-in-polygon2d check:

https://github.com/dimforge/parry/assets/1734958/cd89afee-02f4-432f-9c85-ee1466008e8a