コード例 #1
0
ファイル: SevenParameters.cs プロジェクト: crazygis/YzgMap
        /// <summary>
        /// 参数反转
        /// </summary>
        /// <returns></returns>
        public SevenParameters Reverse()
        {
            SevenParameters result = new SevenParameters();

            result.XaxisRotateRadian = -this.XaxisRotateRadian;
            result.YaxisRotateRadian = -this.YaxisRotateRadian;
            result.ZaxisRotateRadian = -this.ZaxisRotateRadian;
            result.XaxisDeviation    = -this.XaxisDeviation;
            result.YaxisDeviation    = -this.YaxisDeviation;
            result.ZaxisDeviation    = -this.ZaxisDeviation;
            result.ScaleParameter    = -this.ScaleParameter;

            return(result);
        }
コード例 #2
0
        private double m;  // 尺度参数

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="parameters">七参数</param>
        public BursaWolfTransformation(SevenParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("SevenParameters");
            }

            this.rx = parameters.XaxisRotateRadian;
            this.ry = parameters.YaxisRotateRadian;
            this.rz = parameters.ZaxisRotateRadian;
            this.dx = parameters.XaxisDeviation;
            this.dy = parameters.YaxisDeviation;
            this.dz = parameters.ZaxisDeviation;
            this.m  = parameters.ScaleParameter;
        }