raja
Class LightRay

java.lang.Object
  |
  +--raja.Ray
        |
        +--raja.LightRay

public class LightRay
extends Ray

A class to represent rays that originate from a point and head for a light source. The LightRay class extends the Ray class with two fields:

See Also:
Ray, LightSource

Field Summary
 double distance
          The distance between the ray's origin and the light source.
 RGB light
          The light intensity of the light ray.
 
Fields inherited from class raja.Ray
direction, origin
 
Constructor Summary
LightRay(Point3D origin, Point3D destination, RGB light)
          Creates a LightRay object initialized with the specified origin, destination and light intensity.
LightRay(Point3D origin, Vector3D direction, RGB light, double distance)
          Creates a LightRay object initialized with the specified origin, direction, light intensity and distance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

light

public RGB light
The light intensity of the light ray.

distance

public double distance
The distance between the ray's origin and the light source.
Constructor Detail

LightRay

public LightRay(Point3D origin,
                Vector3D direction,
                RGB light,
                double distance)
Creates a LightRay object initialized with the specified origin, direction, light intensity and distance.
Parameters:
origin - the origin of the newly constructed LightRay.
direction - the direction of the newly constructed LightRay.
light - the light intensity of the newly constructed LightRay.
distance - the distance between the ray's origin and the light source it heads for.

LightRay

public LightRay(Point3D origin,
                Point3D destination,
                RGB light)
Creates a LightRay object initialized with the specified origin, destination and light intensity. The destination should be the location of the light source. The direction and distance of the newly constructed LightRay are computed from this location.
Parameters:
origin - the origin of the newly constructed LightRay.
destination - the location of the light source.
light - the light intensity of the newly constructed LightRay.