com.badlogic.gdx.graphics
Class OrthographicCamera
java.lang.Object
com.badlogic.gdx.graphics.Camera
com.badlogic.gdx.graphics.OrthographicCamera
public class OrthographicCamera
- extends Camera
A camera with orthographic projection.
- Author:
- mzechner
Field Summary |
float |
zoom
the zoom of the camera |
Fields inherited from class com.badlogic.gdx.graphics.Camera |
combined, direction, far, frustum, invProjectionView, near, position, projection, up, view, viewportHeight, viewportWidth |
Constructor Summary |
OrthographicCamera()
|
OrthographicCamera(float viewportWidth,
float viewportHeight)
Constructs a new OrthographicCamera, using the given viewport width and height. |
OrthographicCamera(float viewportWidth,
float viewportHeight,
float diamondAngle)
Constructs a new OrthographicCamera, using the given viewport width and height. |
Method Summary |
void |
findDirectionForIsoView(float targetAngle,
float epsilon,
int maxIterations)
|
void |
update()
Recalculates the projection and view matrix of this camera and the Frustum planes. |
Methods inherited from class com.badlogic.gdx.graphics.Camera |
apply, getPickRay, getPickRay, lookAt, normalizeUp, project, project, rotate, translate, unproject, unproject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
zoom
public float zoom
- the zoom of the camera
OrthographicCamera
public OrthographicCamera()
OrthographicCamera
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.
- Parameters:
viewportWidth
- the viewport widthviewportHeight
- the viewport height
OrthographicCamera
public OrthographicCamera(float viewportWidth,
float viewportHeight,
float diamondAngle)
- Constructs a new OrthographicCamera, using the given viewport width and height. This will create a camera useable for
iso-metric views. The diamond angle is specifies the angle of a tile viewed isometrically.
- Parameters:
viewportWidth
- the viewport widthviewportHeight
- the viewport heightdiamondAngle
- the angle in degrees
findDirectionForIsoView
public void findDirectionForIsoView(float targetAngle,
float epsilon,
int maxIterations)
update
public void update()
- Description copied from class:
Camera
- Recalculates the projection and view matrix of this camera and the
Frustum
planes. Use this after you've manipulated
any of the attributes of the camera.
- Specified by:
update
in class Camera
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)