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

Add triangle/ray and gltf/ray intersect function with tests #777

Merged
merged 88 commits into from
Jul 25, 2024

Conversation

joseph-kaile
Copy link
Collaborator

@joseph-kaile joseph-kaile commented Dec 13, 2023

Added two new utility functions, rayTriangle and intersectRayGltfModel. They have unit tests to verify their correctness.

This PR can really be thought of as two distinct efforts:

  • The implementation of ray triangle intersections in a mathematically correct and performant way
  • glTF traversals that are robust and support all reasonable use cases. A good bit of coding was devoted this. Also notable, the glTF test data was generated using python scripts.

kring

This comment was marked as resolved.

@javagl

This comment was marked as resolved.

@csciguy8 csciguy8 marked this pull request as draft May 6, 2024 22:31
@csciguy8 csciguy8 mentioned this pull request May 13, 2024
11 tasks
@csciguy8
Copy link
Contributor

csciguy8 commented Jul 9, 2024

Still, the code in this PR just relied on existing functionality. Nobody can expect someone who uses the OrientedBoundingBox to look into the constructor code and see whether there might be an open TODO (of which nobody knows how to resolve it).

I'm thinking we should make this a separate issue, and not handle it for this PR.

I do have opinions of course (like letting the OBB constructor code throw), but this feels like something to be discussed outside of ray intersection tests.

@csciguy8

This comment was marked as outdated.

@j9liu j9liu added this to the August 2024 Release milestone Jul 23, 2024
@csciguy8

This comment was marked as outdated.

@csciguy8
Copy link
Contributor

@kring Ready for one more pass!

@kring
Copy link
Member

kring commented Jul 25, 2024

Looks good, thanks! I'll merge as soon as CI passes.

@kring kring merged commit 619751a into main Jul 25, 2024
24 checks passed
@kring kring deleted the gltf-ray-intersect branch July 25, 2024 18:22
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

Successfully merging this pull request may close these issues.

6 participants