edu.uprm.ece.terrainrenderer
Class Camera

java.lang.Object
  extended by edu.uprm.ece.terrainrenderer.Camera

public class Camera
extends java.lang.Object

Class that represents the virtual camera.

Author:
Ricardo Veguilla (veguilla@ece.uprm.edu)

Field Summary
private  Angle angle
           
private  float deltaAngle
          Default constructor.
private  Light light
           
private  float movementOffset
           
private  Vertex position
           
 
Constructor Summary
Camera()
           
Camera(Vertex position, Angle angle, float movementOffset)
          Constructor with camera position and angle paramenters.
 
Method Summary
 void cameraDisplacement(int axis, boolean positive)
           
 Angle getAngle()
           
 float[] getCameraMatrix()
           
 Vertex getPosition()
           
 void moveBackward()
           
 void moveDown()
           
 void moveForward()
           
 void moveLeft()
           
 void moveRight()
           
 void moveUp()
           
 void rollLeft()
           
 void rollRight()
           
 void rotateDown()
           
 void rotateLeft()
           
 void rotateRight()
           
 void rotateUp()
           
 void set(javax.media.opengl.GL gl)
           
 void setAngle(Angle angle)
           
 void setPosition(Vertex position)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

position

private Vertex position

angle

private Angle angle

light

private Light light

deltaAngle

private float deltaAngle
Default constructor.


movementOffset

private float movementOffset
Constructor Detail

Camera

public Camera()

Camera

public Camera(Vertex position,
              Angle angle,
              float movementOffset)
Constructor with camera position and angle paramenters.

Parameters:
position - The position of the camera.
angle - The orientation of the camera.
movementOffset - How much the camera moves in each step.
Method Detail

getAngle

public Angle getAngle()
Returns:
Returns the angle.

setAngle

public void setAngle(Angle angle)
Parameters:
angle - The angle to set.

getPosition

public Vertex getPosition()
Returns:
Returns the position.

setPosition

public void setPosition(Vertex position)
Parameters:
position - The position to set.

cameraDisplacement

public void cameraDisplacement(int axis,
                               boolean positive)

set

public void set(javax.media.opengl.GL gl)

getCameraMatrix

public float[] getCameraMatrix()

moveForward

public void moveForward()

moveBackward

public void moveBackward()

moveLeft

public void moveLeft()

moveRight

public void moveRight()

moveUp

public void moveUp()

moveDown

public void moveDown()

rotateUp

public void rotateUp()

rotateDown

public void rotateDown()

rotateLeft

public void rotateLeft()

rotateRight

public void rotateRight()

rollLeft

public void rollLeft()

rollRight

public void rollRight()