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:
- the light intensity corresponding to the illumination of the point
by the light source.
- the distance between the point and the light source.
- 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. |
|
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 |
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.
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.