raja.light
Class PointLightSource

java.lang.Object
  |
  +--raja.light.PointLightSource
All Implemented Interfaces:
LightSource, Serializable, Writable

public class PointLightSource
extends Object
implements LightSource, Serializable, Writable

See Also:
Serialized Form

Constructor Summary
PointLightSource(double x, double y, double z, RGB light)
           
PointLightSource(Point3D p, RGB light)
           
 
Method Summary
static Object build(ObjectReader reader)
           
 LightRay getLightRay(Point3D p)
          Returns the LightRay from the specified Point3D to the LightSource.
 RGB getMax()
           
 String toString()
           
 void write(ObjectWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PointLightSource

public PointLightSource(Point3D p,
                        RGB light)

PointLightSource

public PointLightSource(double x,
                        double y,
                        double z,
                        RGB light)
Method Detail

build

public static Object build(ObjectReader reader)
                    throws IOException

getLightRay

public LightRay getLightRay(Point3D p)
Description copied from interface: LightSource
Returns the LightRay from the specified Point3D to the LightSource. If the LightSource does not directly illuminate the specified Point3D, then this method returns null.
Specified by:
getLightRay in interface LightSource
Following copied from interface: raja.light.LightSource
Parameters:
p - a specified Point3D.
Returns:
the LightRay from the specified Point3D to the LightSource if the LightSource directly illuminates this point; null otherwise.

getMax

public RGB getMax()
Specified by:
getMax in interface LightSource

toString

public String toString()
Overrides:
toString in class Object

write

public void write(ObjectWriter writer)
           throws IOException
Specified by:
write in interface Writable