edu.stanford.rsl.konrad.rendering
Class AbstractRayTracer

java.lang.Object
  extended by 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

Constructor Summary
AbstractRayTracer()
           
 
Method Summary
 java.util.ArrayList<PhysicalObject> castRay(AbstractCurve ray)
          Method to cast a ray through the scene.
 AbstractScene getScene()
           
 void setScene(AbstractScene scene)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRayTracer

public AbstractRayTracer()
Method Detail

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