The slab method is an algorithm from computer graphics for finding where a ray meets an axis-aligned bounding box, a task known as the ray-box intersection problem. It treats the box as the overlap of three slabs, each slab being the region between a pair of parallel planes that carry two opposite faces of the box. For every coordinate axis the ray is clipped against the two planes, which gives the parameter values at which the ray enters and leaves that slab. The latest entry value and the earliest exit value across the three axes then bound the part of the ray inside the box, and an intersection exists only when the entry value does not exceed the exit value. The sign of the entry value shows whether the hit lies ahead of or behind the ray origin, which matters in ray casting. Its efficient form allows a branch-free implementation, and with IEEE 754 arithmetic it can cope with rays that run parallel to an axis by using infinite values.
Connections
In Field
Source Slab method (Wikipedia)
Sources
Slab method (Wikipedia)
In Group: Geometric Intersection, Proximity and Measurement Algorithms, Lead
the slab method is an algorithm used to solve the ray-box intersection problem
In Field: Computer Graphics, Lead, field
In computer graphics, the slab method is an algorithm
View the SourceReader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.