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(double originX, double originY, double originZ, double dirX, double dirY, double 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(double, double, double, double, double, double) set()}.

Members

Functions

set
void set(double originX, double originY, double originZ, double dirX, double dirY, double 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(double minX, double minY, double minZ, double maxX, double maxY, double 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