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
PointLightSource
public PointLightSource(Point3D p,
RGB light)
PointLightSource
public PointLightSource(double x,
double y,
double z,
RGB light)
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