|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Light | +--DirectionalLight
DirectionalLight represents a light source that illuminates along parallel rays.
Field Summary | |
Vector |
Direction
Stores the direction the light travels in. |
Fields inherited from class Light |
Intensity |
Constructor Summary | |
DirectionalLight()
Create a default light. |
|
DirectionalLight(Vector v)
Create a new directional light that shines along given direction vector. |
Method Summary | |
void |
print(SceneWriter os)
Print a human readable version of the light definition to the given destination |
void |
read(SceneReader is)
Read the light from the given source. |
void |
write(SceneWriter os)
Write the light to the given destination |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Vector Direction
Constructor Detail |
public DirectionalLight()
public DirectionalLight(Vector v)
v
- the direction of the light raysMethod Detail |
public void read(SceneReader is) throws java.io.IOException, java.lang.NumberFormatException
read
in class Light
is
- the source to read from.
java.io.IOException
- if the light can not be read.
java.io.NumberFormatException
- if there a number format error is encountered.
java.lang.NumberFormatException
public void write(SceneWriter os) throws java.io.IOException
write
in class Light
os
- The destination to write to
java.io.IOException
- if the write fails.public void print(SceneWriter os) throws java.io.IOException
print
in class Light
os
- The destination to write to
java.io.IOException
- if the write fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |