Esempio n. 1
0
        /// <summary>
        /// Gets the ray value.
        /// </summary>
        public Point3D GetRayValue(Point3D ptNear, Point3D ptFar, double zValue)
        {
            LinearTransform t = new LinearTransform();

            t.Init(ptNear.Z, ptFar.Z, 0, 1);
            double f = t.Transform(zValue);

            t.Init(0, 1, ptNear.X, ptFar.X);
            double x = t.Transform(f);

            t.Init(0, 1, ptNear.Y, ptFar.Y);
            double y = t.Transform(f);

            return(new Point3D(x, y, zValue));
        }
Esempio n. 2
0
 public TextureTransform(double from1, double from2, double tx1, double tx2, double ty1, double ty2)
 {
     tx.Init(from1, from2, tx1, tx2);
     ty.Init(from1, from2, ty1, ty2);
 }
Esempio n. 3
0
        /// <summary>
        /// Gets the ray value.
        /// </summary>
        public Point3D GetRayValue(Point3D ptNear, Point3D ptFar, double zValue)
        {
            LinearTransform t = new LinearTransform();
            t.Init(ptNear.Z, ptFar.Z, 0, 1);
            double f = t.Transform(zValue);

            t.Init(0, 1, ptNear.X, ptFar.X);
            double x = t.Transform(f);

            t.Init(0, 1, ptNear.Y, ptFar.Y);
            double y = t.Transform(f);

            return new Point3D(x, y, zValue);
        }