com.badlogic.gdx.graphics
Class PerspectiveCamera
java.lang.Object
com.badlogic.gdx.graphics.Camera
com.badlogic.gdx.graphics.PerspectiveCamera
public class PerspectiveCamera
- extends Camera
A Camera with perspective projection.
- Author:
- mzechner
Field Summary |
float |
fieldOfView
the field of view in degrees |
Fields inherited from class com.badlogic.gdx.graphics.Camera |
combined, direction, far, frustum, invProjectionView, near, position, projection, up, view, viewportHeight, viewportWidth |
Method Summary |
void |
update()
Recalculates the projection and view matrix of this camera and the Frustum planes. |
void |
update(boolean updateFrustum)
Recalculates the projection and view matrix of this camera and the Frustum planes if updateFrustum is
true. |
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 |
fieldOfView
public float fieldOfView
- the field of view in degrees
PerspectiveCamera
public PerspectiveCamera()
PerspectiveCamera
public PerspectiveCamera(float fieldOfView,
float viewportWidth,
float viewportHeight)
- Constructs a new
PerspectiveCamera
with the given field of view and viewport size. The apsect ratio is derrived from
the viewport size.
- Parameters:
fieldOfView
- the field of view in degreesviewportWidth
- the viewport widthviewportHeight
- the viewport height
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
update
public void update(boolean updateFrustum)
- Description copied from class:
Camera
- Recalculates the projection and view matrix of this camera and the
Frustum
planes if updateFrustum
is
true. 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)