The box() helper constructs the six faces of the box by explicitly recombining coordinates, for example:
point3(min.x(), min.y(), max.z())
However, since the function already computes the axis-aligned edge vectors dx, dy, and dz, the six faces can alternatively be constructed symmetrically using only min, max, and these edge vectors:
sides->add(make_shared<quad>(min, dx, dy, mat)); // back
sides->add(make_shared<quad>(min, dx, dz, mat)); // bottom
sides->add(make_shared<quad>(min, dy, dz, mat)); // left
sides->add(make_shared<quad>(max, -dx, -dy, mat)); // front
sides->add(make_shared<quad>(max, -dx, -dz, mat)); // top
sides->add(make_shared<quad>(max, -dy, -dz, mat)); // right