Skip to main content

collapse_edge

Function collapse_edge 

Source
pub fn collapse_edge(
    mesh: &mut SimpleMesh,
    v1: usize,
    v2: usize,
    new_pos: [f64; 3],
) -> usize
Expand description

Collapse edge (v1, v2): move v1 to new_pos, redirect all references to v2 toward v1, then remove any resulting degenerate (zero-area) triangles. Returns the index of the surviving vertex (v1, updated in-place).