Skip to main content

closest_points

Function closest_points 

Source
pub fn closest_points(
    pos1: &Isometry<f64>,
    g1: &dyn Shape,
    pos2: &Isometry<f64>,
    g2: &dyn Shape,
    max_dist: f64,
) -> Result<ClosestPoints, Unsupported>
Expand description

Computes the pair of closest points between two shapes.

Returns ClosestPoints::Disjoint if the objects are separated by a distance greater than max_dist. The result points in ClosestPoints::WithinMargin are expressed in world-space.