|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Object
Object superclass Each type of object must extend and implement this class.
Field Summary | |
Material |
SurfaceMaterial
Holds the material of this object |
Constructor Summary | |
Object()
|
Method Summary | |
abstract double |
intersect(Ray ray)
Find the intersection of an object and a given ray. |
abstract Vector |
normal(Point pt)
Find the normal of an object at the given point on its surface. |
abstract void |
print(SceneWriter os)
Print a human readable version of the object definition to the given destination |
abstract void |
read(SceneReader is)
Read the object from the given source |
abstract void |
write(SceneWriter os)
Write the object 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 Material SurfaceMaterial
Constructor Detail |
public Object()
Method Detail |
public abstract double intersect(Ray ray)
ray
- the ray to intersect with
double
value that gives the distance
along the ray.public abstract Vector normal(Point pt)
pt
- the surface point to find the normal at
public abstract void read(SceneReader is) throws java.io.IOException, java.lang.NumberFormatException
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 abstract void write(SceneWriter os) throws java.io.IOException
os
- the destination to write to
java.io.IOException
- if the write fails.public abstract void print(SceneWriter os) throws java.io.IOException
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 |