Skip to main content

overlaps_aabb3_aabb3

Function overlaps_aabb3_aabb3 

Source
pub fn overlaps_aabb3_aabb3<S>(a: Aabb3<S>, b: Aabb3<S>) -> bool
where S: Copy + PartialOrd,
Expand description

Overlap test of 3D axis-aligned bounding boxes.

AABBs that are merely touching are not counted as intersecting:

let a = Aabb3::with_minmax ([ 0.0, 0.0, 0.0].into(), [1.0, 1.0, 1.0].into())
  .unwrap();
let b = Aabb3::with_minmax ([-1.0, 0.0, 0.0].into(), [0.0, 1.0, 1.0].into())
  .unwrap();
assert!(!overlaps_aabb3_aabb3 (a, b));