//package comp557.a5; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; /** * Use this class to store the result of an intersection. */ public class IntersectResult { /** The normal at the intersection */ public Vector3d n = new Vector3d(); /** Intersection position */ //public Point3d p = new Point3d(); /** The object of the intersection */ public Object3D object = null; /** Parameter on the ray giving the position of the intersection */ public double t = Double.POSITIVE_INFINITY; //public boolean isIntersected = false; //public int id = -1; // UV Coordinates of the object public double u = Double.NaN; public double v = Double.NaN; /** * Default constructor. */ IntersectResult() { // do nothing } /** * Copy constructor. */ IntersectResult(IntersectResult other) { n.set(other.n); //p.set(other.p); t = other.t; } }