most efficient AABB vs Ray collision algorithms
Posted
by
Asher Einhorn
on Game Development
See other posts from Game Development
or by Asher Einhorn
Published on 2011-10-12T11:02:27Z
Indexed on
2012/10/14
3:53 UTC
Read the original article
Hit count: 278
collision-detection
Is there a known 'most efficient' algorithm for AABB vs Ray collision detection?
I recently stumbled accross Arvo's AABB vs Sphere collision algorithm, and I am wondering if there is a similarly noteworthy algorithm for this.
One must have condition for this algorithm is that I need to have the option of querying the result for the distance from the ray's origin to the point of collision. having said this, if there is another, faster algorithm which does not return distance, then in addition to posting one that does, also posting that algorithm would be very helpful indeed.
Please also state what the function's return argument is, and how you use it to return distance or a 'no-collision' case. For example, does it have an out parameter for the distance as well as a bool return value? or does it simply return a float with the distance, vs a value of -1 for no collision?
(For those that don't know: AABB = Axis Aligned Bounding Box)
© Game Development or respective owner