intersectsBox method

bool intersectsBox(
  1. Box3 box
)

Implementation

bool intersectsBox(Box3 box){
  return (
    checkAABBAxis(
      start.x, start.y, end.x, end.y,
      box.min.x, box.max.x, box.min.y, box.max.y,
      radius
    ) &&
    checkAABBAxis(
      start.x, start.z, end.x, end.z,
      box.min.x, box.max.x, box.min.z, box.max.z,
      radius
    ) &&
    checkAABBAxis(
      start.y, start.z, end.y, end.z,
      box.min.y, box.max.y, box.min.z, box.max.z,
      radius
    )
  );
}