raja.light
Class DirectionalLightSource
java.lang.Object
|
+--raja.light.DirectionalLightSource
- All Implemented Interfaces:
- LightSource, Serializable, Writable
- public class DirectionalLightSource
- extends Object
- implements LightSource, Serializable, Writable
- See Also:
- Serialized Form
DirectionalLightSource
public DirectionalLightSource(Vector3D v,
RGB light)
DirectionalLightSource
public DirectionalLightSource(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