-
Notifications
You must be signed in to change notification settings - Fork 250
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
Ported Tomas Akenine-Moller's triangle-AABB implementation to javascript #115
Conversation
Yes, something like a |
|
||
/** | ||
* Function and helpers for computing the intersection between a static triangle and a static AABB. | ||
* Adapted from Tomas Akenine-Möller's public domain implementation: http://www.cs.lth.se/home/Tomas_Akenine_Moller/code/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still add this to LICENSE.md as public domain so all third-party code is referenced from there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the third party code section is pretty out of date, should I open an issue for that or just update it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating it as part of this PR would be fine and appreciated.
Updated: addressed the style issues and added Cesium's AxisAlignedBoundingBox. I will add tests in another commit. |
Looks good. Thanks for updating LICENSE.md. |
Updated! I added a whole bunch of additional tests, and the fact that running jasmine over the whole pipeline still takes less than a second is very encouraging. |
Coverage is only 93% for this file. Can we get it to 100%? https://coveralls.io/builds/6802561/source?filename=lib%2FtriangleAxisAlignedBoundingBoxOverlap.js |
I got coverage to go up a little by fiddling with some of the specs, but as discussed offline getting coverage to 100% will be difficult as the algorithm is heavily optimized for early return. I think we have enough specs to be pretty confident in this port of the algorithm, though. |
Another thought: could we get in touch with Dr. Akenine-Möller about late return edge case triangles? |
I'll merge this now, and will try to get you in touch offline. |
Tomas Akenine-Moller's Reference C implementation can be found here.
Theory page here.
In preparation for uniform grid acceleration in Ambient Occlusion as well as future spatial datastructures.
Should this actually make its way into Cesium at some point?