intersectsBox method

bool intersectsBox(
  1. Box3 box
)

Implementation

bool intersectsBox(Box3 box) {
  // using 6 splitting planes to rule out intersections.
  return box.max.x < min.x ||
          box.min.x > max.x ||
          box.max.y < min.y ||
          box.min.y > max.y ||
          box.max.z < min.z ||
          box.min.z > max.z
      ? false
      : true;
}