示例#1
0
 public static IDMatrix3 ToDMatrix3(this IMatrix3 matrix3)
 {
     return(MaxGlobal.DMatrix3.Create(
                MaxGlobal.DPoint3.Create(matrix3.GetRow(0)),
                MaxGlobal.DPoint3.Create(matrix3.GetRow(1)),
                MaxGlobal.DPoint3.Create(matrix3.GetRow(2)),
                MaxGlobal.DPoint3.Create(matrix3.GetRow(3))
                ));
 }
示例#2
0
        public static float[] ToArray(this IMatrix3 value)
        {
            var row0 = value.GetRow(0).ToArraySwitched();
            var row1 = value.GetRow(1).ToArraySwitched();
            var row2 = value.GetRow(2).ToArraySwitched();
            var row3 = value.GetRow(3).ToArraySwitched();

            return(new[]
            {
                row0[0], row0[1], row0[2], 0,
                row2[0], row2[1], row2[2], 0,
                row1[0], row1[1], row1[2], 0,
                row3[0], row3[1], row3[2], 1
            });
        }
示例#3
0
        public string SetTransform(IMatrix3 matrix)
        {
            var row1T = matrix.GetRow(0);
            var row2T = matrix.GetRow(1);
            var row3T = matrix.GetRow(2);
            var row4T = matrix.GetRow(3);

            string row1      = "[" + row1T.X + ", " + row1T.Y + ", " + row1T.Z + "]";
            string row2      = "[" + row2T.X + ", " + row2T.Y + ", " + row2T.Z + "]";
            string row3      = "[" + row3T.X + ", " + row3T.Y + ", " + row3T.Z + "]";
            string row4      = "[" + (row4T.X * Utility.scaleFactor) + ", " + (row4T.Y * Utility.scaleFactor) + ", " + (row4T.Z * Utility.scaleFactor) + "]";
            string transform = "(matrix3 " + row1 + " " + row2 + " " + row3 + " " + row4 + ")";

            return(transform);
        }
示例#4
0
        public static Matrix convertTo(this IMatrix3 _input)
        {
            Matrix _output = new Matrix(_input.GetRow(0).X, _input.GetRow(0).Y, _input.GetRow(0).Z, 0, _input.GetRow(1).X, _input.GetRow(1).Y, _input.GetRow(1).Z, 0, _input.GetRow(2).X, _input.GetRow(2).Y, _input.GetRow(2).Z, 0, 0, 0, 0, 1);

            return(_output);
        }
示例#5
0
 public Matrix3(IMatrix3 x)
     : this(new Point3(x.GetRow(0)), new Point3(x.GetRow(1)), new Point3(x.GetRow(2)), new Point3(x.GetRow(3)))
 { }
示例#6
0
 public Matrix3(IMatrix3 x)
     : this(new Point3(x.GetRow(0)), new Point3(x.GetRow(1)), new Point3(x.GetRow(2)), new Point3(x.GetRow(3)))
 {
 }