Crate beebox [] [src]

Yet another axis-aligned bounding box (AABB), biased towards ray tracing.

The design is loosely based on the BBox class from the second edition of Physically based rendering: From theory to implementation by Matt Pharr and Greg Humphreys. Consequently, it is geared to the demands of ray tracing and similar applications, and comes with otherwise rarely-used operations such as surface area calculations and ray-AABB intersection calculations.

It is also focused entirely on 32-bit floats. A 64-bit variant may be added in later versions if needed.



An axis-aligned bounding box in 3D space.


Precomputed data for ray-AABB intersection calculation. The data computed depends only on the ray and can be used to intersect one ray against many different Aabbs.