pub fn greedy_quads<T, S>(
    voxels: &[T],
    voxels_shape: &S,
    min: [u32; 3],
    max: [u32; 3],
    faces: &[OrientedBlockFace; 6],
    output: &mut GreedyQuadsBuffer
) where
    T: MergeVoxel,
    S: Shape<3, Coord = u32>, 
Expand description

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

All visible faces of voxels on the interior of [min, max] will be part of some UnorientedQuad 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 [min, max].

All quads created will have the same “merge value” as defined by the MergeVoxel trait. The quads can be post-processed into meshes as the user sees fit.