RayAabIntersection

This is an implementation of the <a href="http://www.cg.cs.tu-bs.de/media/publications/fast-rayaxis-aligned-bounding-box-overlap-tests-using-ray-slopes.pdf">Fast Ray/Axis-Aligned Bounding Box Overlap Tests using Ray Slopes</a> paper. <p> It is an efficient implementation when testing many axis-aligned boxes against the same ray. <p> This class is thread-safe and can be used in a multithreaded environment when testing many axis-aligned boxes against the same ray concurrently.

@author Kai Burjack

Constructors

this
this(float originX, float originY, float originZ, float dirX, float dirY, float dirZ)

Create a new {@link RayAabIntersection} and initialize it with a ray with origin <code>(originX, originY, originZ)</code> and direction <code>(dirX, dirY, dirZ)</code>. <p> In order to change the direction and/or origin of the ray later, use {@link #set(float, float, float, float, float, float) set()}.

Members

Functions

set
void set(float originX, float originY, float originZ, float dirX, float dirY, float dirZ)

Update the ray stored by this {@link RayAabIntersection} with the new origin <code>(originX, originY, originZ)</code> and direction <code>(dirX, dirY, dirZ)</code>.

test
bool test(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

Test whether the ray stored in this {@link RayAabIntersection} intersect the axis-aligned box given via its minimum corner <code>(minX, minY, minZ)</code> and its maximum corner <code>(maxX, maxY, maxZ)</code>. <p> This implementation uses a tableswitch to dispatch to the correct intersection method. <p> This method is thread-safe and can be used to test many axis-aligned boxes concurrently.

Meta