query:: algorithms:: gjk:: closest_points
pub fn closest_points<N, G1: ?Sized, G2: ?Sized>(
simplex: &mut VoronoiSimplex<N>
) -> GJKResult<N> where
Projects the origin on a shape using the Separating Axis GJK algorithm.
The algorithm will stop as soon as the polytope can be proven to be at least
from the origin.
- simplex - the simplex to be used by the GJK algorithm. It must be already initialized with at least one point on the shape boundary.
- exact_dist - if
false, the gjk will stop as soon as it can prove that the origin is at a distance smaller than
max_distbut not inside of
shape. In that case, it returns a
sep_axisis a separating axis. If
falsethe gjk will compute the exact distance and return
GJKResult::Projection(point)if the origin is closer than
max_distbut not inside