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 |
getPickRay, getPickRay, lookAt, lookAt, normalizeUp, project, project, rotate, rotate, rotate, rotate, rotateAround, transform, translate, translate, unproject, unproject |
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 aspect ratio is derived 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 © 2014. All Rights Reserved.