// Check for intersection with each of the six sides of the box.
if (ray.direction().x() != 0.0) {
t = (box.minimumX() - ray.origin().x()) / ray.direction().x();
if (t > 0.0) {
p = ray.pointAt(t);
if (box.minimumY() < p.y() && p.y() < box.maximumY() && box.minimumZ() < p.z() && p.z() < box.maximumZ()) {
Intersection x = super.newIntersection(ray, t, ray.direction().x() > 0.0, BOX_SURFACE_MIN_X)
.setLocation(p);
recorder.record(x);
if (++n == 2) return;
}