Ejemplo n.º 1
0
        /// <summary>
        /// 七参数转换
        /// </summary>
        /// <param name="inputX"></param>
        /// <param name="inputY"></param>
        /// <param name="inputZ"></param>
        /// <param name="outputX"></param>
        /// <param name="outputY"></param>
        /// <param name="outputZ"></param>
        private void sevenParamTransform(double inputX, double inputY, double inputZ,
                                         out double outputX, out double outputY, out double outputZ)
        {
            double[,] rotationMatrix = MatrixTransformation.RotationMatrix(rx, ry, rz);
            double[,] originalCoord  = new double[3, 1];
            originalCoord[0, 0]      = inputX;
            originalCoord[1, 0]      = inputY;
            originalCoord[2, 0]      = inputZ;

            double[,] resCoord = MatrixTransformation.MatrixProduct(rotationMatrix, originalCoord);

            outputX = resCoord[0, 0] * (m + 1) + dx;
            outputY = resCoord[1, 0] * (m + 1) + dy;
            outputZ = resCoord[2, 0] * (m + 1) + dz;
        }