예제 #1
0
        //------------------------------------------------------------------------
        //Perspective premultiply(Affine b)
        //{
        //    //copy this to a
        //    Perspective a = new Perspective(this);

        //    sx = a.sx * b.sx + a.shx * b.shy;
        //    shx = a.sx * b.shx + a.shx * b.sy;
        //    tx = a.sx * b.tx + a.shx * b.ty + a.tx;
        //    shy = a.shy * b.sx + a.sy * b.shy;
        //    sy = a.shy * b.shx + a.sy * b.sy;
        //    ty = a.shy * b.tx + a.sy * b.ty + a.ty;
        //    w0 = a.w0 * b.sx + a.w1 * b.shy;
        //    w1 = a.w0 * b.shx + a.w1 * b.sy;
        //    w2 = a.w0 * b.tx + a.w1 * b.ty + a.w2;

        //    return this;
        //}

        //------------------------------------------------------------------------
        Perspective multiply_inv(Perspective m)
        {
            Perspective t = m;

            t.invert();
            return(multiply(t));
        }
예제 #2
0
        // Multiply inverse of "m" by "this" and assign the result to "this"
        Perspective premultiply_inv(Affine m)
        {
            Perspective t = new Perspective(m);

            t.invert();
            Set(t.multiply(this));
            return(this);
        }
예제 #3
0
        //------------------------------------------------------------------------
        Perspective premultiply_inv(Perspective m)
        {
            Perspective t = m;

            t.invert();
            Set(t.multiply(this));
            return(this);
        }
예제 #4
0
        // Inverse transformation of x and y. It works slow because
        // it explicitly inverts the matrix on every call. For massive
        // operations it's better to invert() the matrix and then use
        // direct transformations.
        void inverse_transform(ref double x, ref double y)
        {
            Perspective t = new Perspective(this);

            if (t.invert())
            {
                t.Transform(ref x, ref y);
            }
        }
예제 #5
0
        ICoordTransformer ICoordTransformer.CreateInvert()
        {
            Perspective newOne = new Perspective(this);

            if (newOne.invert())
            {
                return(newOne);
            }
            else
            {
                return(null);
            }
        }