inline bool intersectRightBox(const BBox& box, const Vector& A, const Vector& B, const Vector& C, Axis axis) { return max(max(A[axis], B[axis]), C[axis]) >= box.vmin[axis] - 1e-6 && box.intersectTriangle(A, B, C); }
inline bool intersectLeftBox(const BBox& box, const Vector& A, const Vector& B, const Vector& C, Axis axis) { return min(min(A[axis], B[axis]), C[axis]) <= box.vmax[axis] + 1e-6 && box.intersectTriangle(A, B, C); }