private static Intersection getIntersection(Ray ray, TriangleObject obj, Model model) {
   Vector3D p0 = VectorUtils.toVector3D(ray.getP0());
   Vector3D p1 = VectorUtils.toVector3D(ray.getP1());
   Vector3D a = obj.getA();
   Vector3D b = obj.getB();
   Vector3D c = obj.getC();
   Vector3D n = obj.getN();
   double den = p1.dotProduct(n);
   if (den != 0.0) {
     double t = (a.dotProduct(n) - p0.dotProduct(n)) / den;
     if (t < EPSILON) {
       return new Intersection(false);
     }
     Vector3D p = p0.add(p1.scalarMultiply(t));
     Vector3D pc = p.subtract(c);
     final Intersection intersection = getIntersection(obj, p, pc);
     if (intersection != null) {
       intersection.setDistance(t);
       return intersection;
     }
   }
   return new Intersection(false);
 }