コード例 #1
0
        internal Matrix4D method_14()
        {
            Matrix4D toWcsTransform = DxfUtil.GetToWCSTransform(this.vector3D_0);

            toWcsTransform.Transpose();
            Matrix4D matrix4D1 = Transformation4D.RotateZ(this.double_6) * toWcsTransform;
            Matrix4D matrix4D2;
            Matrix4D matrix4D3;
            Matrix4D matrix4D4;

            if (this.PerspectiveMode)
            {
                double num1 = Class484.smethod_0(this.size2D_0, this.double_1, this.double_4);
                matrix4D2 = this.method_24();
                matrix4D3 = new Matrix4D(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0 / this.double_1, 0.0, 0.0, -1.0 / this.double_1, 0.0) * Transformation4D.Translation(0.0, 0.0, -num1);
                double num2 = System.Math.Sqrt(this.size2D_0.X * this.size2D_0.X + this.size2D_0.Y * this.size2D_0.Y) / 42.0;
                matrix4D4 = Transformation4D.Scaling(num2, num2, 1.0);
            }
            else
            {
                matrix4D2 = this.method_25();
                matrix4D3 = Matrix4D.Identity;
                double num = this.size2D_0.Y / this.double_4;
                matrix4D4 = Transformation4D.Scaling(num, num, 1.0);
            }
            Matrix4D matrix4D5 = Transformation4D.Translation(-this.point2D_0.X, -this.point2D_0.Y, 0.0);

            return(matrix4D2 * matrix4D4 * matrix4D5 * matrix4D3 * matrix4D1 * Transformation4D.Translation(-(WW.Math.Vector3D) this.point3D_1));
        }
コード例 #2
0
        private Matrix4D method_24()
        {
            double num1 = Class484.smethod_0(this.size2D_0, this.double_1, this.double_4);
            double num2 = this.double_3 - num1;
            double num3 = this.double_2 - num1;
            double num4 = this.bool_6 ? 1.0 / num2 : 0.0;

            return(Transformation4D.Scaling(1.0 / this.size2D_0.X, 1.0 / this.size2D_0.Y, !this.bool_5 ? -1.0 : 1.0 / (1.0 / num3 - num4)) * Transformation4D.Translation(this.size2D_0.X * 0.5, this.size2D_0.Y * 0.5, -num4));
        }
コード例 #3
0
        internal Matrix3D method_16()
        {
            Matrix3D toWcsTransform3D = DxfUtil.GetToWCSTransform3D(this.vector3D_0);

            toWcsTransform3D.Transpose();
            Matrix3D matrix3D1 = Transformation3D.RotateZ(this.double_6) * toWcsTransform3D;
            Matrix3D matrix3D2;

            if (this.PerspectiveMode)
            {
                Class484.smethod_0(this.size2D_0, this.double_1, this.double_4);
                double num = System.Math.Sqrt(this.size2D_0.X * this.size2D_0.X + this.size2D_0.Y * this.size2D_0.Y) / 42.0;
                matrix3D2 = Transformation3D.Scaling(num, num, num);
            }
            else
            {
                double num = this.size2D_0.Y / this.double_4;
                matrix3D2 = Transformation3D.Scaling(num, num, num);
            }
            return(matrix3D2 * matrix3D1);
        }
コード例 #4
0
        public Matrix4D GetTransform(Size2D targetSize)
        {
            Matrix4D toWcsTransform = DxfUtil.GetToWCSTransform(this.vector3D_0);

            toWcsTransform.Transpose();
            Matrix4D matrix4D = Transformation4D.RotateZ(this.double_6) * toWcsTransform;

            return(Transformation4D.Translation(this.point2D_2.X, this.point2D_2.Y, 0.0) * (!this.PerspectiveMode ? Matrix4D.Identity : new Matrix4D(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0 / this.double_2, 0.0, 0.0, -1.0 / this.double_2, 0.0) * Transformation4D.Translation(0.0, 0.0, -Class484.smethod_0(new Size2D(targetSize.X * this.double_1, targetSize.Y), this.double_2, this.double_0))) * matrix4D * Transformation4D.Translation(-this.point3D_0.X, -this.point3D_0.Y, -this.point3D_0.Z));
        }