コード例 #1
0
ファイル: Class908.cs プロジェクト: 15831944/WW
        public void Transform(ITransformer4D transformer)
        {
            WW.Math.Point3D position  = this.Position;
            Vector4D        vector4D1 = new Vector4D(position.X, position.Y, position.Z, 1.0);

            WW.Math.Point3D point3D1  = transformer.TransformToPoint3D(this.matrix4D_0 * vector4D1);
            Bounds2D        bounds    = this.interface34_0.Font.Metrics.GetBounds(this.interface34_0.Text, Enum24.flag_0);
            Vector4D        vector4D2 = vector4D1 + new Vector4D(bounds.Delta.X, 0.0, 0.0, 0.0);

            WW.Math.Point3D point3D2  = transformer.TransformToPoint3D(this.matrix4D_0 * vector4D2);
            Vector4D        vector4D3 = vector4D1 + new Vector4D(0.0, bounds.Delta.Y, 0.0, 0.0);

            WW.Math.Point3D point3D3  = transformer.TransformToPoint3D(this.matrix4D_0 * vector4D3);
            Vector3D        vector3D1 = (point3D2 - point3D1) / bounds.Delta.X;
            Vector3D        vector3D2 = (point3D3 - point3D1) / bounds.Delta.Y;
            Vector3D        zaxis     = Vector3D.CrossProduct(vector3D1, vector3D2);

            this.matrix4D_0 = Transformation4D.GetCoordSystem(vector3D1, vector3D2, zaxis, point3D1);
        }
コード例 #2
0
        private static Matrix4D smethod_0(Vector3D xaxis, Vector3D zaxis)
        {
            Vector3D yaxis = Vector3D.CrossProduct(zaxis, xaxis);

            return(Transformation4D.GetCoordSystem(xaxis, yaxis, zaxis));
        }