Esempio n. 1
0
        internal static MarshalMatrix convert(Matrix mat)
        {
            MarshalMatrix ret = new MarshalMatrix();

            ret.x0 = mat[0, 0];
            ret.y0 = mat[1, 0];
            ret.z0 = mat[2, 0];
            ret.w0 = mat[3, 0];

            ret.x1 = mat[0, 1];
            ret.y1 = mat[1, 1];
            ret.z1 = mat[2, 1];
            ret.w1 = mat[3, 1];

            ret.x2 = mat[0, 2];
            ret.y2 = mat[1, 2];
            ret.z2 = mat[2, 2];
            ret.w2 = mat[3, 2];

            ret.x3 = mat[0, 3];
            ret.y3 = mat[1, 3];
            ret.z3 = mat[2, 3];
            ret.w3 = mat[3, 3];

            return(ret);
        }
Esempio n. 2
0
        internal static Matrix convert(MarshalMatrix mat)
        {
            Matrix ret = new Matrix();

            ret[0, 0] = mat.x0;
            ret[1, 0] = mat.y0;
            ret[2, 0] = mat.z0;
            ret[3, 0] = mat.w0;

            ret[0, 1] = mat.x1;
            ret[1, 1] = mat.y1;
            ret[2, 1] = mat.z1;
            ret[3, 1] = mat.w1;

            ret[0, 2] = mat.x2;
            ret[1, 2] = mat.y2;
            ret[2, 2] = mat.z2;
            ret[3, 2] = mat.w2;

            ret[0, 3] = mat.x3;
            ret[1, 3] = mat.y3;
            ret[2, 3] = mat.z3;
            ret[3, 3] = mat.w3;

            return(ret);
        }
Esempio n. 3
0
 public static extern MarshalMatrix inverse(MarshalMatrix mat);
Esempio n. 4
0
 public static extern MarshalMatrix transpose(MarshalMatrix mat);