pub fn shape_distance(
input: &DistanceInput,
cache: &mut SimplexCache,
simplexes: Option<&mut [Simplex]>,
) -> DistanceOutputExpand description
Compute the closest points between two shapes represented as point clouds.
The cache is input/output: on the first call set SimplexCache::count to
zero. (b2ShapeDistance)
The underlying GJK algorithm may be debugged by passing in a simplex buffer;
pass None normally. The C version only records intermediate simplexes in
debug builds; this port records them whenever a buffer is provided.
Uses GJK for computing the distance between convex shapes. https://box2d.org/files/ErinCatto_GJK_GDC2010.pdf