OSDN Git Service

ran gdx-tools HeaderFixer tool
[mikumikustudio/libgdx-mikumikustudio.git] / gdx / src / com / badlogic / gdx / maps / MapRenderer.java
1 /*******************************************************************************\r
2  * Copyright 2011 See AUTHORS file.\r
3  * \r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  * \r
8  *   http://www.apache.org/licenses/LICENSE-2.0\r
9  * \r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  ******************************************************************************/
16
17 package com.badlogic.gdx.maps;
18
19 import com.badlogic.gdx.graphics.OrthographicCamera;
20 import com.badlogic.gdx.math.Matrix4;
21
22 /**
23  * @brief models a common way of rendering Map objects
24  */
25 public interface MapRenderer {
26         /**
27          * Sets the projection matrix and viewbounds from the given camera. If
28          * the camera changes, you have to call this method again. The viewbounds
29          * are taken from the camera's position and viewport size as well as the 
30          * scale. This method will only work if the camera's direction vector
31          * is (0,0,-1) and its up vector is (0, 1, 0), which are the defaults. 
32          * @param camera the {@link OrthographicCamera}
33          */
34         public void setView(OrthographicCamera camera);
35         
36         /**
37          * Sets the projection matrix for rendering, as well as the bounds of the map
38          * which should be rendered. Make sure that the frustum spanned by the projection
39          * matrix coincides with the viewbounds.
40          * @param projectionMatrix
41          * @param viewboundsX
42          * @param viewboundsY
43          * @param viewboundsWidth
44          * @param viewboundsHeight
45          */
46         public void setView(Matrix4 projectionMatrix, float viewboundsX, float viewboundsY, float viewboundsWidth, float viewboundsHeight);
47         
48         /**
49          * Renders all the layers of a map.
50          */
51         public void render();
52         
53         /** Renders the given layers of a map.
54          * 
55          * @param layers
56          */
57         public void render(int[] layers);
58 }