import java.io.*; import java.lang.*; /** * Light superclass * * Each type of light must extend and implement this class. * @author Anthony Steed * @version 1.0 */ public abstract class Light { /** * Holds the colour of this light */ public Colour Intensity; /** * Read the light from the given source * @param is the source to read from * @exception java.io.IOException * if the light can not be read * @exception java.io.NumberFormatException * if there a number format error is encountered */ abstract public void read(SceneReader is) throws IOException, NumberFormatException; /** * Write the light to the given destination * @param os the destination to write to * @exception java.io.IOException * if the write fails. */ abstract public void write(SceneWriter os) throws IOException; /** * Print a human readable version of the light definition to the * given destination * @param os the destination to write to * @exception java.io.IOException * if the write fails. */ abstract public void print(SceneWriter os) throws IOException; }