apps.lightrays.raytracer.scene
Class Ray

java.lang.Object
  extended by apps.lightrays.raytracer.scene.Ray
Direct Known Subclasses:
RefractedRay, ShadowRay

public class Ray
extends java.lang.Object

The Class Ray.


Field Summary
 Point origin
          The origin.
 
Constructor Summary
Ray(Scene scene, Point origin, Vector direction, int depth)
          Instantiates a new ray.
 
Method Summary
 void fire(Colour c)
          Fire.
 int getDepth()
          Gets the depth.
 Vector getDirection()
          Gets the direction.
 Point getOrigin()
          Gets the origin.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

origin

public Point origin
The origin.

Constructor Detail

Ray

public Ray(Scene scene,
           Point origin,
           Vector direction,
           int depth)
Instantiates a new ray.

Parameters:
scene - the scene
origin - the origin
direction - the direction
depth - the depth
Method Detail

fire

public void fire(Colour c)
Fire.

Parameters:
c - the c

getDepth

public int getDepth()
Gets the depth.

Returns:
the depth

getDirection

public Vector getDirection()
Gets the direction.

Returns:
the direction

getOrigin

public Point getOrigin()
Gets the origin.

Returns:
the origin