Skip to main content

body_boundary_distance

Function body_boundary_distance 

Source
pub fn body_boundary_distance<'a, 'b>(
    a: impl Into<PlacedBody<'a>>,
    b: impl Into<PlacedBody<'b>>,
    accuracy: Scalar,
    tolerance: Tolerance,
) -> Result<BodyDistance, BodyMeasureError>
Expand description

Distance between the boundaries of two bodies of exact solids, to within accuracy (#229): the least over item pairs, by one shared search.

Items may touch or overlap (see the module docs). A negative or NaN accuracy is read as zero.

ยงErrors

BodyMeasureError::EmptyBody for an empty slice, and BodyMeasureError::Measure with what crate::boundary_distance refuses.