[][src]Function building_blocks_mesh::greedy_quads::greedy_quads

pub fn greedy_quads<V, T>(
    voxels: &V,
    extent: &Extent3i,
    output: &mut GreedyQuadsBuffer<T::Material>
) where
    V: Array<[i32; 3]> + GetUncheckedRelease<Stride, T> + ForEach<[i32; 3], (Point3i, Stride), Data = T>,
    T: IsEmpty + MaterialVoxel

The "Greedy Meshing" algorithm described by Mikola Lysenko in the 0fps article.

All visible faces of voxels on the interior of extent will be part of some Quad returned via the output buffer. A 3x3x3 kernel will be applied to each point on the interior, hence the extra padding required on the boundary. voxels only needs to contain the set of points in extent.

The quads can be post-processed into meshes as the user sees fit.