bevy/crates/bevy_math/src/primitives
Joona Aalto 6a3b059db9
Implement bounding volume intersections (#11439)
# Objective

#10946 added bounding volume types and an `IntersectsVolume` trait, but
didn't actually implement intersections between bounding volumes.

This PR implements AABB-AABB, circle-circle / sphere-sphere, and
AABB-circle / AABB-sphere intersections.

## Solution

Implement `IntersectsVolume` for bounding volume pairs. I also added
`closest_point` methods to return the closest point on the surface /
inside of bounding volumes. This is used for AABB-circle / AABB-sphere
intersections.

---------

Co-authored-by: IQuick 143 <IQuick143cz@gmail.com>
2024-01-22 17:55:59 +00:00
..
dim2.rs Implement bounding volume intersections (#11439) 2024-01-22 17:55:59 +00:00
dim3.rs Implement bounding volume intersections (#11439) 2024-01-22 17:55:59 +00:00
mod.rs Add new_and_length method to Direction2d and Direction3d (#11172) 2024-01-08 22:36:56 +00:00