Skip to main content

mesh_grid_greedy

Function mesh_grid_greedy 

Source
pub fn mesh_grid_greedy(
    dim: [usize; 3],
    cell: f32,
    origin: Vec3,
    threshold: f32,
    density: impl Fn(usize, usize, usize) -> f32,
) -> MeshData
Expand description

Merges coplanar exposed faces with equal density. Each cell is sampled once. A solid cuboid becomes six quads. Invalid parameters or >16M cells return an empty mesh.