de.rico.engine.camera
Class CameraViewPort

java.lang.Object
  extended by de.rico.engine.camera.CameraViewPort

public class CameraViewPort
extends java.lang.Object

This class represents the viewport of a camera

Author:
Frank Bruns

Constructor Summary
CameraViewPort(int x, int y, int width, int height)
          Creates a new camera viewport
 
Method Summary
 int getHeight()
          Returns the height of the viewport.
 int getWidth()
          Returns the width of the viewport
 int getX()
          Returns the x-coordinate of the viewport
 int getY()
          Returns the y-coordinate of the viewport
 void setHeight(int height)
          Sets the height of the viewport to the specified value
 void setTo(int x, int y, int width, int height)
          Sets the viewport to the specified parameters
 void setWidth(int width)
          Sets the width of the viewport to the specifed value
 void setX(int x)
          Sets the x-coordinate of the viewport to the specified values
 void setY(int y)
          Sets the y-coordinate of the viewport to the specified values
 java.lang.String toString()
           
 void update(javax.media.opengl.GL gl)
          Updates the viewport if neccessary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CameraViewPort

public CameraViewPort(int x,
                      int y,
                      int width,
                      int height)
Creates a new camera viewport

Parameters:
x - x-coordinate of the viewport
y - y-coordinate of the viewport
width - width of the viewport
height - height of the viewport
Method Detail

setTo

public void setTo(int x,
                  int y,
                  int width,
                  int height)
Sets the viewport to the specified parameters

Parameters:
x - x-coordinate of the viewport
y - y-coordinate of the viewport
width - width of the viewport
height - height of the viewport

getX

public int getX()
Returns the x-coordinate of the viewport

Returns:
x-coordinate of the viewport

setX

public void setX(int x)
Sets the x-coordinate of the viewport to the specified values

Parameters:
x - new x-coordinate for the viewport

setY

public void setY(int y)
Sets the y-coordinate of the viewport to the specified values

Parameters:
y - new y-coordinate for the viewport

setWidth

public void setWidth(int width)
Sets the width of the viewport to the specifed value

Parameters:
width - new width of the viewport

setHeight

public void setHeight(int height)
Sets the height of the viewport to the specified value

Parameters:
height - new height of the viewport

getY

public int getY()
Returns the y-coordinate of the viewport

Returns:
y-coordinate of the viewport

getWidth

public int getWidth()
Returns the width of the viewport

Returns:
width of the viewport

getHeight

public int getHeight()
Returns the height of the viewport.

Returns:
height of the viewport

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

update

public void update(javax.media.opengl.GL gl)
Updates the viewport if neccessary

Parameters:
gl -