Assume we have an AABB, B, defined by a center point, , and a positive half diagonal vector, . Note that and can easily be derived from the minimum and maximum corners, and of B, that is, , and .
Now, we want to test B against a plane . There is a surprisingly fast way of performing this test. The idea is to compute the “extent,” here denoted e, of the box when projected onto the plane normal, . In theory, this can be done by projecting all the eight different half diagonals of the box onto the normal, and picking the longest one. In practice, however, this can be implemented rapidly as