com.badlogic.gdx.graphics
Class PerspectiveCamera

java.lang.Object
  extended by com.badlogic.gdx.graphics.Camera
      extended by 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
 
Constructor Summary
PerspectiveCamera()
           
PerspectiveCamera(float fieldOfView, float viewportWidth, float viewportHeight)
          Constructs a new PerspectiveCamera with the given field of view and viewport size.
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fieldOfView

public float fieldOfView
the field of view in degrees

Constructor Detail

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 degrees
viewportWidth - the viewport width
viewportHeight - the viewport height
Method Detail

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.