Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intersection testing: sphere - line segment #102

Open
AGuyCoding opened this issue Dec 18, 2020 · 1 comment
Open

intersection testing: sphere - line segment #102

AGuyCoding opened this issue Dec 18, 2020 · 1 comment

Comments

@AGuyCoding
Copy link

Is it possible to extend the code to implement "Geometric collision / intersection testing" to
calculate the intersection of a "line segment" and "sphere"?

@adamlwgriffiths
Copy link
Owner

adamlwgriffiths commented Dec 18, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants