public Vector3d <T> IntersectT(Line3 <T> line) { Numeric <T> d = normal ^ line.Dir; if (d.Equals(Numeric <T> .Zero())) { return(Vector3d <T> .Zero()); } T t = -((normal ^ line.From) - distance) / d; Vector3d <T> point = line.GetPoint(t); return(point); }
public IntersectionResult <Vec3 <T> > Intersect(Line3 <T> line) { Numeric <T> d = normal ^ line.Dir; if (d.Equals(Numeric <T> .Zero())) { return(new IntersectionResult <Vec3 <T> >(false)); } T t = -((normal ^ line.Pos) - distance) / d; Vec3 <T> point = line.GetPoint(t); return(new IntersectionResult <Vec3 <T> >(point, true)); }