world benchmark

treemaps-chunkstates-iteration
EmaMaker 2022-08-22 16:32:20 +02:00
parent 3cb0a0529c
commit 6ea3fbc8aa
1 changed files with 11 additions and 0 deletions

View File

@ -124,4 +124,15 @@ public class WorldManager {
return vx >= Math.min(0, chunkX - Config.RENDER_DISTANCE ) && vx < Math.min(0, chunkX + Config.RENDER_DISTANCE) && vy >= chunkY - Config.RENDER_DISTANCE && vy < Math.min(0, chunkY + Config.RENDER_DISTANCE) && vz >= chunkZ - Config.RENDER_DISTANCE && vz < Math.min(0, chunkZ + Config.RENDER_DISTANCE);
}
public void benchmark(){
for(int i = 0; i < Config.RENDER_DISTANCE*2; i++)
for(int j = 0; j < Config.RENDER_DISTANCE*2; j++)
for(int k = 0; k < Config.RENDER_DISTANCE*2; k++){
Chunk c = new Chunk(new Vector3f(i,j,k));
c.arrayGenerateCorner();
chunkRenderer.greedyMeshing(this, c);
game.getRootNode().attachChild(c.chunkNode);
}
}
}