|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectWorld
public class World
Represents the static objects in the world. Essentially, this is simply a set of surfaces.
| Constructor Summary | |
|---|---|
World(java.util.Collection<Surface> surfaces)
Constructs a world containing the given surfaces. |
|
| Method Summary | |
|---|---|
Bounds |
getBounds()
Returns the bounding box including all surfaces in this world. |
Intersection |
getClosestIntersection(Ray query)
Returns information about the intersection of the given ray with the closest surface that it intersects, or null if there is no intersection. |
java.util.Collection<Surface> |
getSurfaces()
Returns a collection including all the surfaces of this world. |
static World |
read(java.io.InputStream in)
Returns a newly created world based on the data found in the given stream. |
static World |
read(java.io.Reader reader)
Returns a newly created world based on the data found in the given input source. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public World(java.util.Collection<Surface> surfaces)
surfaces - contains the surfaces to be added into
this world.| Method Detail |
|---|
public Intersection getClosestIntersection(Ray query)
null if there is no intersection.
query - the ray that should be traced to determine
which surface it intersects first.
null if there is no
intersection.public java.util.Collection<Surface> getSurfaces()
public Bounds getBounds()
public static World read(java.io.InputStream in)
throws java.io.IOException
java.io.IOException
public static World read(java.io.Reader reader)
throws java.io.IOException
java.io.IOException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||