This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The original algorithm comes from https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/ | |
and the code is almost a straight adaptation of that code (https://github.com/mikolalysenko/mikolalysenko.github.com/blob/gh-pages/MinecraftMeshes/js/greedy.js) | |
*/ | |
fn greedy_meshing( | |
is_voxel_present: &dyn Fn(i32, i32, i32) -> bool, | |
dims: &[i32; 3], | |
) -> Vec<[[i32; 3]; 4]> { | |
let mut quads = Vec::new(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am icytv on github. | |
* I am icytv (https://keybase.io/icytv) on keybase. | |
* I have a public key ASAJsBOvP6ICoOSrRCSFKdlvMKjXuBbVz2pjHWCqrcG7ygo | |
To claim this, I am signing this object: |