Class WorldRenderer
java.lang.Object
org.collebol.engine.gui.graphics.renderer.Renderer
org.collebol.engine.gui.graphics.renderer.WorldRenderer
The WorldRenderer class contains several methods to simply render world and chunks.
WorldRenderer is relative to a CameraRenderer.
Usage:
WorldRenderer worldRenderer = new WorldRenderer(world, engine);
engine.getRenderers().registerNewRenderer(worldRenderer); //register the worldRenderer
- Since:
- 1.0-dev
- Author:
- ColleBol - contact@collebol.org
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrenderChunkRelativeToCamera(Chunk chunk) voidRenders all chunks inWorld.getChunks()loaded in the world.voidRenders all chunks inWorld.getChunks()loaded in the world as Batch.
-
Constructor Details
-
WorldRenderer
WorldRenderer constructor- Parameters:
world- the world to be rendered.e- the engine instance.
-
-
Method Details
-
renderWorldChunks
public void renderWorldChunks()Renders all chunks inWorld.getChunks()loaded in the world.Relative to a
CameraRenderer -
renderWorldChunksAsBatch
public void renderWorldChunksAsBatch()Renders all chunks inWorld.getChunks()loaded in the world as Batch. This method iterates through each chunk and uses theCameraRendererto render the objects within each chunk as a batch. -
renderChunkRelativeToCamera
-