edu.uprm.ece.terrainrenderer
Class Camera
java.lang.Object
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)
Constructor Summary |
Camera()
|
Camera(Vertex position,
Angle angle,
float movementOffset)
Constructor with camera position and angle paramenters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
position
private Vertex position
angle
private Angle angle
light
private Light light
deltaAngle
private float deltaAngle
- Default constructor.
movementOffset
private float movementOffset
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.
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()