Skip to main content

triangles_intersect

Function triangles_intersect 

Source
pub fn triangles_intersect(
    a0: [f64; 3],
    a1: [f64; 3],
    a2: [f64; 3],
    b0: [f64; 3],
    b1: [f64; 3],
    b2: [f64; 3],
) -> bool
Expand description

Test whether two triangles in 3-D intersect.

Uses the Devillers-Guigue algorithm (interval overlap on the line of intersection of the two triangle planes). Returns true if the triangles intersect (including edge/vertex contacts).