threecrate_simplification/
lib.rs

1//! Mesh simplification and decimation algorithms
2//! 
3//! This crate provides algorithms for reducing mesh complexity while
4//! preserving important geometric features:
5//! - Quadric error decimation
6//! - Edge collapse algorithms
7//! - Clustering-based simplification
8
9pub mod quadric_error;
10pub mod edge_collapse;
11pub mod clustering;
12
13pub use quadric_error::*;
14pub use edge_collapse::*;
15pub use clustering::*;
16
17use threecrate_core::{TriangleMesh, Result};
18
19/// Simplify a mesh by reducing the number of faces/vertices
20pub trait MeshSimplifier {
21    /// Simplify mesh with target reduction ratio (0.0 = no reduction, 1.0 = maximum reduction)
22    fn simplify(&self, mesh: &TriangleMesh, reduction_ratio: f32) -> Result<TriangleMesh>;
23}