edu.princeton.plot
Class RayEdgeIntersection
java.lang.Object
edu.princeton.plot.RayEdgeIntersection
public class RayEdgeIntersection
- extends java.lang.Object
TODO Put here a description of what this class does.
- Author:
- MosheKatzwer.
Created Jul 1, 2013.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RayEdgeIntersection
public RayEdgeIntersection()
getEdgeIntersection
public static Point getEdgeIntersection(Point e1,
Point e2,
Point f1,
Point f2,
double tol)
getIntersection
public static Point getIntersection(Point o,
Point d,
Point e1,
Point e2,
double tol)
- Solves the system
o + a * d = z * e1 + (1-z) * e2
- Parameters:
o
- origin of rayd
- direction of raye1
- vertex 1 of edgee2
- vertex 2 of edgetol
- the method tolerance, what the method treats as "zero"
- Returns:
- [a, z]