Class Intersection

java.lang.Object
  extended by Intersection

public class Intersection
extends java.lang.Object

A class to hold intersection information. Intersection contains the time of intersection and the Shape intersected.


Field Summary
static double NoIntersection
          Double value that specifies there was no intersection.
 Shape shape
          The shape intersected, or null if time == NoIntersection
 double time
          The time of intersection, or NoIntersection if there was no intersection
 
Constructor Summary
Intersection()
          Constructs the default intersection where time == NoIntersection and shape == null.
Intersection(double time, Shape shape)
           
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

time

public double time
The time of intersection, or NoIntersection if there was no intersection


shape

public Shape shape
The shape intersected, or null if time == NoIntersection


NoIntersection

public static double NoIntersection
Double value that specifies there was no intersection.

Constructor Detail

Intersection

public Intersection()
Constructs the default intersection where time == NoIntersection and shape == null.


Intersection

public Intersection(double time,
                    Shape shape)