Class PointLight
java.lang.Object
|
+--Light
|
+--PointLight
- public class PointLight
- extends Light
PointLight represents a light sources that illuminates from a
fixed origin
Field Summary |
Point |
Origin
Stores the origin of the point light. |
Constructor Summary |
PointLight()
Create a default light. |
PointLight(Point p)
Create a new point light that at the given point. |
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 |
Origin
public Point Origin
- Stores the origin of the point light.
PointLight
public PointLight()
- Create a default light.
PointLight
public PointLight(Point p)
- Create a new point light that at the given point.
- Parameters:
p
- The position of the light.
read
public void read(SceneReader is)
throws java.io.IOException,
java.lang.NumberFormatException
- Read the light from the given source
- Parameters:
is
- The source to read from- Throws:
- java.io.IOException - if the light can not be read
- java.io.NumberFormatException - if there a number format error is encountered
- Overrides:
- read in class Light
write
public void write(SceneWriter os)
throws java.io.IOException
- Write the light to the given destination
- Parameters:
os
- The destination to write to- Throws:
- java.io.IOException - if the write fails.
- Overrides:
- write in class Light
print
public void print(SceneWriter os)
throws java.io.IOException
- Print a human readable version of the light definition to the
given destination
- Parameters:
os
- The destination to write to- Throws:
- java.io.IOException - if the write fails.
- Overrides:
- print in class Light