Package com.badlogic.gdx.maps
Interface MapRenderer
-
- All Known Subinterfaces:
TiledMapRenderer
- All Known Implementing Classes:
BatchTiledMapRenderer,HexagonalTiledMapRenderer,IsometricStaggeredTiledMapRenderer,IsometricTiledMapRenderer,OrthoCachedTiledMapRenderer,OrthogonalTiledMapRenderer
public interface MapRendererModels a common way of renderingMapobjects
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrender()Renders all the layers of a map.voidrender(int[] layers)Renders the given layers of a map.voidsetView(OrthographicCamera camera)Sets the projection matrix and viewbounds from the given camera.voidsetView(Matrix4 projectionMatrix, float viewboundsX, float viewboundsY, float viewboundsWidth, float viewboundsHeight)Sets the projection matrix for rendering, as well as the bounds of the map which should be rendered.
-
-
-
Method Detail
-
setView
void setView(OrthographicCamera camera)
Sets the projection matrix and viewbounds from the given camera. If the camera changes, you have to call this method again. The viewbounds are taken from the camera's position and viewport size as well as the scale. This method will only work if the camera's direction vector is (0,0,-1) and its up vector is (0, 1, 0), which are the defaults.- Parameters:
camera- theOrthographicCamera
-
setView
void setView(Matrix4 projectionMatrix, float viewboundsX, float viewboundsY, float viewboundsWidth, float viewboundsHeight)
Sets the projection matrix for rendering, as well as the bounds of the map which should be rendered. Make sure that the frustum spanned by the projection matrix coincides with the viewbounds.- Parameters:
projectionMatrix-viewboundsX-viewboundsY-viewboundsWidth-viewboundsHeight-
-
render
void render()
Renders all the layers of a map.
-
render
void render(int[] layers)
Renders the given layers of a map.- Parameters:
layers- the layers to render.
-
-