Function parry3d::query::gjk::closest_points

source ·
pub fn closest_points<G1, G2>(
    pos12: &Isometry<Real>,
    g1: &G1,
    g2: &G2,
    max_dist: Real,
    exact_dist: bool,
    simplex: &mut VoronoiSimplex
) -> GJKResult
where G1: ?Sized + SupportMap, G2: ?Sized + SupportMap,
Expand description

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 max_dist away from the origin.

§Arguments:

  • 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_dist but not inside of shape. In that case, it returns a GJKResult::Proximity(sep_axis) where sep_axis is a separating axis. If false the gjk will compute the exact distance and return GJKResult::Projection(point) if the origin is closer than max_dist but not inside shape.