示例#1
0
        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);
        }
示例#2
0
文件: Plane3.cs 项目: rkhhsan/nlinear
        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));
        }