tracer
Class Plane

java.lang.Object
  extended bytracer.Traceable
      extended bytracer.Plane

public class Plane
extends Traceable

3D flat, onbounded, traceable thingy, represented by normal vector and distance from the origin


Constructor Summary
Plane()
           
Plane(Vec3 n, float o)
           
 
Method Summary
 boolean hit(Ray r)
          Returns a boolean indicating whether the line segment (r.origin + t*r.direction) with 0 <= t <= 1 intersects the object.
 IntersectionInfo intersect(Ray r)
          Returns an IntersectionInfo object indicating whether the ray r intersects this object or not.
 void parse(Parser p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plane

public Plane(Vec3 n,
             float o)

Plane

public Plane()
Method Detail

parse

public void parse(Parser p)
           throws java.io.IOException
Throws:
java.io.IOException

intersect

public IntersectionInfo intersect(Ray r)
Description copied from class: Traceable
Returns an IntersectionInfo object indicating whether the ray r intersects this object or not.

Specified by:
intersect in class Traceable
See Also:
IntersectionInfo

hit

public boolean hit(Ray r)
Description copied from class: Traceable
Returns a boolean indicating whether the line segment (r.origin + t*r.direction) with 0 <= t <= 1 intersects the object.

Specified by:
hit in class Traceable