Pyrr
Pyrr copied to clipboard
intersection testing: sphere - line segment
Is it possible to extend the code to implement "Geometric collision / intersection testing" to calculate the intersection of a "line segment" and "sphere"?
The current geometric testing API is limited and needs to be changed to return a structure of points, segments, lines, etc Something like:
{'points': [], 'segments': [], 'lines': [], ....}
Things like plane vs sphere becomes complicated, now you're returning a shape (2d circle with rotation). Handling those kinds of things gets tricky.
I'm not in a position to dedicate any time to this myself, but PRs with unit tests are welcome. Even if it just gets us part way there.
Bonus points: We should probably also put things like AABB, geometric testing, etc into an unstable module since they're a bit unloved and incomplete.