net.sf.j3d.threeD.raytracer.engine
Class Intersection

java.lang.Object
  extended by net.sf.j3d.threeD.raytracer.engine.Intersection

public class Intersection
extends Object

An Intersection object stores data for the intersections between a ray and a surface.


Constructor Summary
Intersection(Ray ray, Surface surface, double[] intersections)
          Constructs a new Intersection object that represents an intersection between the specified Ray and Surface objects at the specified points along the ray represented by the Ray object.
 
Method Summary
 double getClosestIntersection()
           
 double[] getIntersections()
           
 Ray getRay()
           
 Surface getSurface()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Intersection

public Intersection(Ray ray,
                    Surface surface,
                    double[] intersections)
Constructs a new Intersection object that represents an intersection between the specified Ray and Surface objects at the specified points along the ray represented by the Ray object.

Method Detail

getRay

public Ray getRay()
Returns:
The Ray object stored by this Intersection object.

getSurface

public Surface getSurface()
Returns:
The Surface object stored by this Intersection object.

getIntersections

public double[] getIntersections()
Returns:
The intersections stored by this Intersection object.

getClosestIntersection

public double getClosestIntersection()

toString

public String toString()
Overrides:
toString in class Object
Returns:
A String representation of this Intersection object.