| Modifier and Type | Field and Description |
|---|---|
| private final Vector3 | |
| public float | zoom
the zoom of the camera |
| Access | Constructor and Description |
|---|---|
| public | |
| public | OrthographicCamera(float
the viewport width viewportWidth, float the viewport height viewportHeight)Constructs a new OrthographicCamera, using the given viewport width and height. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | setToOrtho(boolean
whether y should be pointing down yDown)Sets this camera to an orthographic projection using a viewport fitting the screen resolution, centered at (Gdx.graphics.getWidth()/2, Gdx.graphics.getHeight()/2), with the y-axis pointing up or down. |
| public void | setToOrtho(boolean
whether y should be pointing down. yDown, float viewportWidth, float viewportHeight)Sets this camera to an orthographic projection, centered at (viewportWidth/2, viewportHeight/2), with the y-axis pointing up or down. |
| public void | translate(float
the displacement on the x-axis x, float the displacement on the y-axis y)Moves the camera by the given amount on each axis. |
| public void | |
| public void | update()
Implements abstract com. Recalculates the projection and view matrix of this camera and the |
| public void | update(boolean updateFrustum)
Implements abstract com. Recalculates the projection and view matrix of this camera and the |
| tmp | back to summary |
|---|---|
| private final Vector3 tmp | |
| zoom | back to summary |
|---|---|
| public float zoom the zoom of the camera | |
| OrthographicCamera | back to summary |
|---|---|
| public OrthographicCamera() | |
| OrthographicCamera | back to summary |
|---|---|
| public OrthographicCamera(float viewportWidth, float viewportHeight) Constructs a new OrthographicCamera, using the given viewport width and height. For pixel perfect 2D rendering just supply the screen size, for other unit scales (e.g. meters for box2d) proceed accordingly. The camera will show the region [-viewportWidth/2, -(viewportHeight/2-1)] - [(viewportWidth/2-1), viewportHeight/2]
| |
| rotate | back to summary |
|---|---|
| public void rotate(float angle) Rotates the camera by the given angle around the direction vector. The direction and up vector will not be orthogonalized. | |
| setToOrtho | back to summary |
|---|---|
| public void setToOrtho(boolean yDown) Sets this camera to an orthographic projection using a viewport fitting the screen resolution, centered at (Gdx.graphics.getWidth()/2, Gdx.graphics.getHeight()/2), with the y-axis pointing up or down.
| |
| setToOrtho | back to summary |
|---|---|
| public void setToOrtho(boolean yDown, float viewportWidth, float viewportHeight) Sets this camera to an orthographic projection, centered at (viewportWidth/2, viewportHeight/2), with the y-axis pointing up or down.
| |
| translate | back to summary |
|---|---|
| public void translate(float x, float y) Moves the camera by the given amount on each axis.
| |
| translate | back to summary |
|---|---|
| public void translate(Vector2 vec) Moves the camera by the given vector.
| |
| update | back to summary |
|---|---|
| public void update() Implements abstract com. Doc from com. Recalculates the projection and view matrix of this camera and the
| |
| update | back to summary |
|---|---|
| public void update(boolean updateFrustum) Implements abstract com. Doc from com. Recalculates the projection and view matrix of this camera and the
| |