tracer
Class Plane

java.lang.Object
  extended by tracer.Traceable
      extended by tracer.Plane

public class Plane
extends Traceable

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


Field Summary
(package private)  Vec3 normal
           
(package private)  float offset
           
(package private)  Vec3 uDirection
           
(package private)  Vec3 vDirection
           
 
Fields inherited from class tracer.Traceable
material
 
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
 

Field Detail

normal

Vec3 normal

offset

float offset

uDirection

Vec3 uDirection

vDirection

Vec3 vDirection
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