pub fn mesh_grid(
dim: [usize; 3],
cell: f32,
origin: Vec3,
threshold: f32,
shrink: bool,
density: impl Fn(usize, usize, usize) -> f32,
) -> MeshDataExpand description
Meshes a voxel grid. density(x, y, z) > threshold means filled; uv.x carries the density.
With shrink every voxel is scaled by its density (soft puffs, all faces emitted); otherwise
full cubes are merged and faces between neighbours are culled.