|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectScene
public class Scene
Represents a scene, including both the surfaces and the light sources in the scene.
Constructor Summary | |
---|---|
Scene()
|
Method Summary | |
---|---|
void |
add(Surface toAdd)
Adds the given surface into this scene. |
void |
addLight(Point source)
Adds a light at the given poin into this scene with full brightness. |
double |
getAmbient()
Returns the brightness of the scene's ambient light. |
java.util.List<Point> |
getLights()
Returns an unmodifiable list holding the locations of all lights in the scene. |
boolean |
inShadow(Point query,
Point light)
Returns true if there are any surfaces in the scene between the given point and the given light source. |
void |
setAmbient(double value)
Sets the brightness of the scene's ambient light. |
Intersection |
traceRay(Ray query)
Determines the closest intersection of the given ray with the scene that lies at least 1 unit away - ie, where the difference between hit point and the ray's origin is at least as long as the ray's direction vector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Scene()
Method Detail |
---|
public void add(Surface toAdd)
public void addLight(Point source)
public java.util.List<Point> getLights()
public void setAmbient(double value)
public double getAmbient()
public Intersection traceRay(Ray query)
public boolean inShadow(Point query, Point light)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |