tracer
Class Traceable

java.lang.Object
  extended by tracer.Traceable
Direct Known Subclasses:
Plane, Sphere, Triangle

public abstract class Traceable
extends java.lang.Object

Base class for all visible objects.


Field Summary
(package private)  Material material
           
 
Constructor Summary
Traceable()
           
 
Method Summary
abstract  boolean hit(Ray r)
          Returns a boolean indicating whether the line segment (r.origin + t*r.direction) with 0 <= t <= 1 intersects the object.
abstract  IntersectionInfo intersect(Ray r)
          Returns an IntersectionInfo object indicating whether the ray r intersects this object or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

material

Material material
Constructor Detail

Traceable

public Traceable()
Method Detail

intersect

public abstract IntersectionInfo intersect(Ray r)
Returns an IntersectionInfo object indicating whether the ray r intersects this object or not.

See Also:
IntersectionInfo

hit

public abstract boolean hit(Ray r)
Returns a boolean indicating whether the line segment (r.origin + t*r.direction) with 0 <= t <= 1 intersects the object.