diff --git a/src/main/java/com/emamaker/voxeltest/intervaltrees/world/WorldManager.java b/src/main/java/com/emamaker/voxeltest/intervaltrees/world/WorldManager.java index 3ddf6d8..562c576 100644 --- a/src/main/java/com/emamaker/voxeltest/intervaltrees/world/WorldManager.java +++ b/src/main/java/com/emamaker/voxeltest/intervaltrees/world/WorldManager.java @@ -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); + } + } + }