bevy/crates/bevy_math/src
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
..
bounding Implement bounding volume intersections (#11439) 2024-01-22 17:55:59 +00:00
primitives Implement bounding volume intersections (#11439) 2024-01-22 17:55:59 +00:00
rects Replace or document ignored doctests (#11040) 2024-01-01 16:50:56 +00:00
affine3.rs Automatic batching/instancing of draw commands (#9685) 2023-09-21 22:12:34 +00:00
aspect_ratio.rs Introduce AspectRatio struct (#10368) 2023-12-17 02:01:26 +00:00
cubic_splines.rs Remove Default impl for CubicCurve (#11335) 2024-01-14 04:40:37 +00:00
lib.rs Add geometric primitives to bevy_math::prelude (#11432) 2024-01-20 20:15:38 +00:00
ray.rs Split Ray into Ray2d and Ray3d and simplify plane construction (#10856) 2023-12-06 14:09:04 +00:00