Skip to main content

self_intersects

Function self_intersects 

Source
pub fn self_intersects(mesh: &Mesh, bvh: &Bvh) -> Result<bool>
Expand description

Whether any two alive triangles of mesh intersect or touch while sharing no vertex id: the early-exit form of self_intersecting_pairs, for callers that only need the bool.

The pair test is the same one, so the answer agrees with whether self_intersecting_pairs appends anything: neighbours that share a vertex id are never reported, degenerate triangles are skipped, and distinct vertices at the same position are distinct vertices. The search stops at the first intersecting pair it finds; the sequential search allocates nothing.

ยงErrors

QueryError::MeshMismatch or QueryError::StaleBvh when bvh does not match mesh, and QueryError::OutOfMemory when the parallel split of the search cannot grow.