Skip to main content

near_coplanar

Function near_coplanar 

Source
pub fn near_coplanar(
    a: &TriMesh,
    b: &TriMesh,
    linear: f64,
) -> Option<NearCoplanar>
Expand description

The first pair of triangles of a and b that nearly share a plane within linear, in ascending (first, second) order.

A pair qualifies when both triangles are non-degenerate, the distance between them is at most linear, every corner of each lies within linear of the other’s plane, and at least one corner of the second is not exactly on the first’s plane. None when no pair qualifies, and when linear is negative or not finite (zero is allowed: then only an offset of zero distance would qualify, which exact coplanarity excludes).

§Panics

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