コード例 #1
0
        public static Matrix ConversionMatrix(
            CoordinateSystem Source,
            CoordinateSystem Target)
        {
            DNSolver solver           = new DNSolver();
            DNMatrix conversionMatrix = solver.Solve(
                MatrixToDNMatrix(Source.Matrix),
                MatrixToDNMatrix(Target.Matrix));

            return(DNMatrixToMatrix(conversionMatrix));
        }
コード例 #2
0
        private static Matrix DNMatrixToMatrix(DNMatrix m)
        {
            Matrix result = new Matrix();

            for (int row = 0; row < m.Rows; row++)
            {
                for (int col = 0; col < m.Columns; col++)
                {
                    result[row, col] = (float)m[row, col];
                }
            }
            return(result);
        }