apps.lightrays.raytracer.scene
Class Camera

java.lang.Object
  extended by apps.lightrays.raytracer.scene.Camera

public class Camera
extends java.lang.Object

The Class Camera.


Constructor Summary
Camera()
          Instantiates a new camera.
Camera(java.awt.Dimension viewport_size)
          Instantiates a new camera.
 
Method Summary
 Ray generateRay(Scene s, double x, double y)
          Generate ray.
 Ray[][] generateSupersampledRays(Scene s, int x, int y, int side, double f)
          Generate supersampled rays.
 void setLookAt(Vector focusedPosition)
          Sets the look at.
 void setViewpoint(Vector eyePosition)
          Sets the viewpoint.
 void setViewportSize(java.awt.Dimension size)
          Sets the viewport size.
 void updateVectors()
          Update vectors.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Camera

public Camera()
Instantiates a new camera.


Camera

public Camera(java.awt.Dimension viewport_size)
Instantiates a new camera.

Parameters:
viewport_size - the viewport_size
Method Detail

generateRay

public final Ray generateRay(Scene s,
                             double x,
                             double y)
Generate ray.

Parameters:
s - the s
x - the x
y - the y
Returns:
the ray

generateSupersampledRays

public final Ray[][] generateSupersampledRays(Scene s,
                                              int x,
                                              int y,
                                              int side,
                                              double f)
Generate supersampled rays.

Parameters:
s - the s
x - the x
y - the y
side - the side
f - the f
Returns:
the ray[][]

setLookAt

public void setLookAt(Vector focusedPosition)
Sets the look at.

Parameters:
focusedPosition - the new look at

setViewpoint

public void setViewpoint(Vector eyePosition)
Sets the viewpoint.

Parameters:
eyePosition - the new viewpoint

setViewportSize

public void setViewportSize(java.awt.Dimension size)
Sets the viewport size.

Parameters:
size - the new viewport size

updateVectors

public void updateVectors()
Update vectors.