edu.stanford.rsl.konrad.rendering
Class AbstractRayTracer
java.lang.Object
edu.stanford.rsl.konrad.rendering.AbstractRayTracer
- Direct Known Subclasses:
- PriorityRayTracer, SimpleRayTracer
public abstract class AbstractRayTracer
- extends java.lang.Object
Abstract Class to model a ray caster. The ray caster casts rays through the scene and determines all his along a ray.
Then the ray caster determines the line segments between the objects and determines their representation.
- Author:
- akmaier
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRayTracer
public AbstractRayTracer()
getScene
public AbstractScene getScene()
- Returns:
- the scene
setScene
public void setScene(AbstractScene scene)
- Parameters:
scene
- the scene to set
castRay
public java.util.ArrayList<PhysicalObject> castRay(AbstractCurve ray)
- Method to cast a ray through the scene. Returns the edge segments which pass through different materials.
Rays must be normalized!
- Parameters:
ray
-
- Returns:
- the list of line segments which were hit by the ray in the correct order