Function min_gap

Source
pub fn min_gap(a: &TriMesh, b: &TriMesh, search_length: f64) -> Option<f64>
Expand description

Smallest distance between the surfaces of a and b.

Returns None when nothing is found within search_length, and Some(0.0) when the surfaces touch or interpenetrate. A caller doing clash detection reads those as “clear beyond the search radius” and “clash” respectively, and any positive value as the remaining clearance.

§Panics

Never. A malformed index buffer yields None rather than a panic.