Class PerspectiveCamera


  • public class PerspectiveCamera
    extends Camera
    A Camera with perspective projection.
    • Field Detail

      • fieldOfView

        public float fieldOfView
        the field of view of the height, in degrees
    • Constructor Detail

      • PerspectiveCamera

        public PerspectiveCamera()
      • PerspectiveCamera

        public PerspectiveCamera​(float fieldOfViewY,
                                 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:
        fieldOfViewY - the field of view of the height, in degrees, the field of view for the width will be calculated according to the aspect ratio.
        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