Expand description
Mesh simplification by quadric-error edge collapse.
simplify shrinks a mesh toward SimplifyOptions::target_triangles
by repeatedly collapsing the edge whose collapse adds the least quadric
error (Garland-Heckbert): each vertex holds the sum of the squared
distances to its incident face planes, an edge collapses to the point
minimizing the summed quadrics, and the vertex quadrics merge. Boundary
vertices stay put when SimplifyOptions::preserve_boundary is set, so
open rims keep their shape. Collapses that would break the link condition
or fold the fan are skipped. The whole plan is computed on working copies
first and committed through one Transaction,
which keeps the call atomic under sweep: either every collapse lands or
nothing does.
UVs (Mesh::uvs) follow: a survivor takes the
UV at its new position’s parameter along the collapsed edge. The quadrics
ignore UVs, so textures can stretch. With preserve_boundary, seams (which
are boundaries) stay exactly as they are.
Structs§
- Simplify
Options - Options for
simplify. - Simplify
Options Builder - Builder for
SimplifyOptions. - Simplify
Report - Outcome of
simplify.
Functions§
- simplify
- Shrinks the mesh toward
options.target_trianglesby quadric-error edge collapses (see the module docs). Boundary vertices stay put whenpreserve_boundaryis set. Stops early when no valid collapse is left, which can leave more triangles than the target on meshes with locked or non-manifold edges.