Ejemplo n.º 1
0
        public Class472(
            string text,
            Interface14 font,
            Color color,
            short lineWeight,
            Interface35[] glyphs,
            Matrix2D basicTrafo,
            double charSpacingFactor)
        {
            this.string_0      = text;
            this.interface14_0 = font;
            this.color_0       = color;
            this.short_0       = lineWeight;
            this.interface35_0 = glyphs;
            this.double_0      = charSpacingFactor;
            this.matrix2D_0    = basicTrafo;
            foreach (ICanonicalGlyph glyph in glyphs)
            {
                this.vector2D_0 += glyph.Advance;
            }
            if (charSpacingFactor != 1.0)
            {
                this.vector2D_0.X *= charSpacingFactor;
            }
            this.generalShape2D_0 = new GeneralShape2D();
            Vector2D zero = Vector2D.Zero;

            foreach (Interface35 glyph in glyphs)
            {
                this.generalShape2D_0.Append(glyph.Path, false, Transformation3D.Translation(zero.X, zero.Y));
                zero += glyph.Advance * charSpacingFactor;
            }
        }
Ejemplo n.º 2
0
        private static Matrix3D?smethod_0(Point2D[] p1, Point2D[] p2)
        {
            Matrix3D matrix3D1 = Transformation3D.Translation(-p1[0].X, -p1[0].Y);
            Matrix3D matrix3D2 = Transformation3D.Translation(-p2[0].X, -p2[0].Y);
            Point2D  point2D1  = matrix3D1.Transform(p1[1]);
            Point2D  point2D2  = matrix3D2.Transform(p2[1]);
            Matrix3D matrix3D3 = Transformation3D.Rotate(-System.Math.Atan2(point2D1.Y, point2D1.X));
            Matrix3D matrix3D4 = Transformation3D.Rotate(-System.Math.Atan2(point2D2.Y, point2D2.X));
            Point2D  point2D3  = matrix3D3.Transform(matrix3D1.Transform(p1[2]));
            Point2D  point2D4  = matrix3D4.Transform(matrix3D2.Transform(p2[2]));
            double   num       = ((Vector2D)point2D2).GetLength() / ((Vector2D)point2D1).GetLength();
            Matrix3D matrix3D5;

            if (point2D3.Y != 0.0)
            {
                double m01 = (point2D4.X - num * point2D3.X) / point2D3.Y;
                matrix3D5 = new Matrix3D(num, m01, 0.0, 0.0, point2D4.Y / point2D3.Y, 0.0, 0.0, 0.0, 1.0);
            }
            else
            {
                if (point2D3.X == 0.0)
                {
                    return(new Matrix3D?());
                }
                double m10 = (point2D4.Y - num * point2D3.Y) / point2D3.X;
                matrix3D5 = new Matrix3D(num, 0.0, 0.0, m10, num, 0.0, 0.0, 0.0, 1.0);
            }
            Matrix3D matrix3D6 = Transformation3D.Translation(p2[0].X, p2[0].Y) * Transformation3D.Rotate(System.Math.Atan2(point2D2.Y, point2D2.X)) * matrix3D5 * matrix3D3 * matrix3D1;

            if ((matrix3D6.Transform(p1[2]) - p2[2]).GetLength() / num < 0.0001)
            {
                return(new Matrix3D?(matrix3D6));
            }
            return(new Matrix3D?());
        }
Ejemplo n.º 3
0
        public void Render(Transformation3D camera)
        {
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);

            var cam = camera.CalcLocalToWorldColumnMajorMatrix();

            plane.Draw(cam);
            visualSmoke.Render(cam);
            visualWaterfall.Render(cam);
            visualExplosion.Render(cam);
        }
Ejemplo n.º 4
0
        public void Render(Transformation3D camera, Vector3 cameraPosition)
        {
            if (shaderProgram is null)
            {
                return;
            }
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);

            DrawObject(geometry, envMap, envMap, camera, cameraPosition);
            DrawObject(geometryRef, envMap, sphereTex, camera, cameraPosition);
            DrawObject(geometryRefract, envMap, sphereTex, camera, cameraPosition);
        }
Ejemplo n.º 5
0
        public static Matrix3D GetArbitraryCoordSystem(Vector3D zaxis)
        {
            Vector3D xaxis;

            if (System.Math.Abs(zaxis.X) > System.Math.Abs(zaxis.Y))
            {
                double num = 1.0 / System.Math.Sqrt(zaxis.X * zaxis.X + zaxis.Z * zaxis.Z);
                xaxis = new Vector3D(-zaxis.Z * num, 0.0, zaxis.X * num);
            }
            else
            {
                double num = 1.0 / System.Math.Sqrt(zaxis.Y * zaxis.Y + zaxis.Z * zaxis.Z);
                xaxis = new Vector3D(0.0, zaxis.Z * num, -zaxis.Y * num);
            }
            return(Transformation3D.smethod_0(xaxis, zaxis));
        }
Ejemplo n.º 6
0
        public void PropagateTo(IScaler scaler, ITranslator translator)
        {
            if (!this.ValidForZoom)
            {
                return;
            }
            Rectangle2D normalizedZoomRectangle = this.NormalizedZoomRectangle;
            Point2D     center = normalizedZoomRectangle.Center;
            Point2D     point  = (Transformation3D.Translation(translator.Translation) * Transformation3D.Scaling2D(scaler.ScaleFactor)).GetInverse().Transform(center);
            double      num    = 2.0 / System.Math.Max(System.Math.Abs(normalizedZoomRectangle.Width), System.Math.Abs(normalizedZoomRectangle.Height));

            scaler.ScaleFactor *= num;
            Point2D point2D = (Transformation3D.Translation(translator.Translation) * Transformation3D.Scaling2D(scaler.ScaleFactor)).Transform(point);

            translator.Translation += center - point2D;
        }
Ejemplo n.º 7
0
        public void Transform(Transformation3D xform)
        {
            Rotate((Single)xform.Rotation.X, (Single)xform.Rotation.Y, (Single)xform.Rotation.Z);

            //Position = new Vector3(Position.X + xform.PositionOffset.X,
            //    Position.Y + xform.PositionOffset.Y,
            //    Position.Z + xform.PositionOffset.Z);

            for (var c = 0; c < Vertices.Length; c++)
            {
                var v = Vertices[c];
                Vertices[c] = new Vector3(v.X * (xform.Scale.X),
                                          v.Y * (xform.Scale.Y),
                                          v.Z * (xform.Scale.Z));
            }
        }
Ejemplo n.º 8
0
        internal void TransformMe(double rotationAngle, double scaling, Vector2D offset)
        {
            Matrix3D matrix3D = Transformation3D.Translation(offset) * Transformation3D.Scaling2D(scaling) * Transformation3D.Rotate(rotationAngle);

            foreach (DxfPattern.Line line in this.list_0)
            {
                line.Angle    += rotationAngle;
                line.BasePoint = matrix3D.Transform(line.BasePoint);
                line.Offset    = matrix3D.Transform(line.Offset);
                for (int index1 = 0; index1 < line.DashLengths.Count; ++index1)
                {
                    List <double> dashLengths;
                    int           index2;
                    (dashLengths = line.DashLengths)[index2 = index1] = dashLengths[index2] * scaling;
                }
            }
        }
Ejemplo n.º 9
0
        public void SetWipeoutPolygon(IList <WW.Math.Point2D> polygon)
        {
            Bounds2D bounds2D = new Bounds2D();

            bounds2D.Update(polygon);
            this.InsertionPoint = (WW.Math.Point3D)bounds2D.Min;
            this.XAxis          = new Vector3D(bounds2D.Delta.X, 0.0, 0.0);
            this.YAxis          = new Vector3D(0.0, bounds2D.Delta.Y, 0.0);
            Matrix3D matrix3D = Transformation3D.Scaling(1.0 / this.XAxis.X, -1.0 / this.YAxis.Y, 1.0) * Transformation3D.Translation(WW.Math.Point2D.Zero - bounds2D.Center);

            this.BoundaryVertices.Clear();
            foreach (WW.Math.Point2D point in (IEnumerable <WW.Math.Point2D>)polygon)
            {
                this.BoundaryVertices.Add(matrix3D.Transform(point));
            }
            if (this.BoundaryVertices.Count <= 2 || !(this.BoundaryVertices[0] != this.BoundaryVertices[this.BoundaryVertices.Count - 1]))
            {
                return;
            }
            this.BoundaryVertices.Add(this.BoundaryVertices[0]);
        }
Ejemplo n.º 10
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);
        }
Ejemplo n.º 11
0
        public void Render(IEnumerable <IBody> bodies, float time, Transformation3D camera)
        {
            GL.Enable(EnableCap.DepthTest);
            GL.Enable(EnableCap.Blend);
            GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
            if (shaderProgram is null)
            {
                return;
            }
            var instancePositions = new List <Vector3>();
            var instanceScale     = new List <float>();

            foreach (var body in bodies)
            {
                instancePositions.Add(body.Location);
                instanceScale.Add((float)Math.Pow(body.Mass, 0.33f));
            }
            geometryBody.SetAttribute(shaderProgram.GetResourceLocation(ShaderResourceType.Attribute, "instancePosition"), instancePositions.ToArray(), VertexAttribPointerType.Float, 3, true);
            geometryBody.SetAttribute(shaderProgram.GetResourceLocation(ShaderResourceType.Attribute, "instanceScale"), instanceScale.ToArray(), VertexAttribPointerType.Float, 1, true);

            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            shaderProgram.Activate();
            shaderProgram.Uniform("time", time);
            shaderProgram.Uniform("camera", camera.CalcLocalToWorldColumnMajorMatrix());
            geometryBody.Draw(instancePositions.Count);
            shaderProgram.Deactivate();

            floorShaderProgram.Activate();
            floorShaderProgram.Uniform("time", time);
            floorShaderProgram.Uniform("floorColor", new Vector4(0, .5f, .5f, 1f));
            floorShaderProgram.Uniform("camera", camera.CalcLocalToWorldColumnMajorMatrix());
            floor.Draw();

            floorShaderProgram.Uniform("floorColor", new Vector4(0, 0, 1, 0.5f));
            waterCube.Draw();
            floorShaderProgram.Deactivate();
            GL.Disable(EnableCap.Blend);
            GL.Disable(EnableCap.DepthTest);
        }
Ejemplo n.º 12
0
        private void DrawObject(VAO geom, ITexture envMap, ITexture materialTex, Transformation3D camera, Vector3 cameraPosition)
        {
            shaderProgram.Activate();

            GL.ActiveTexture(TextureUnit.Texture0 + 0);
            envMap.Activate();
            shaderProgram.Uniform("envMap", 0);
            GL.ActiveTexture(TextureUnit.Texture0 + 1);
            materialTex.Activate();
            shaderProgram.Uniform("materialTex", 1);

            shaderProgram.Uniform("camera", camera.CalcLocalToWorldColumnMajorMatrix());
            shaderProgram.Uniform("cameraPosition", cameraPosition);

            geom.Draw();

            GL.ActiveTexture(TextureUnit.Texture0 + 0);
            envMap.Deactivate();
            GL.ActiveTexture(TextureUnit.Texture0 + 1);
            materialTex.Deactivate();

            shaderProgram.Deactivate();
        }
Ejemplo n.º 13
0
 internal void TransformMe(TransformConfig config, Matrix4D transform)
 {
     this.TransformMe(config, Transformation3D.From(transform));
 }
Ejemplo n.º 14
0
 public DxfPattern CreateTransformed(Matrix4D transform)
 {
     return(this.CreateTransformed(Transformation3D.From(transform)));
 }
Ejemplo n.º 15
0
 public DxfPattern.Line GetTransformed(Matrix4D transform)
 {
     return(this.GetTransformed(Transformation3D.From(transform)));
 }
Ejemplo n.º 16
0
        private static List <Segment2D[]> smethod_8(
            Polyline2D[] borders,
            Point2D reference,
            Vector2D offset,
            Vector2D direction,
            double[] dashes,
            bool fillInterior)
        {
            double   angle     = System.Math.Atan2(direction.Y, direction.X);
            Matrix3D matrix3D1 = Transformation3D.Rotate(-angle) * Transformation3D.Translation(-reference.X, -reference.Y);
            Matrix3D matrix3D2 = Transformation3D.Translation(reference.X, reference.Y) * Transformation3D.Rotate(angle);
            Vector2D vector2D  = matrix3D1.Transform(offset);

            if (vector2D.Y == 0.0)
            {
                return(new List <Segment2D[]>());
            }
            if (vector2D.Y < 0.0)
            {
                vector2D = -vector2D;
            }
            List <Class811.Class818> class818List1 = new List <Class811.Class818>();
            double dashPatternLength = 0.0;

            if (dashes != null)
            {
                foreach (double dash in dashes)
                {
                    dashPatternLength += System.Math.Abs(dash);
                }
            }
            int num1 = 0;
            int num2 = -1;

            foreach (Polyline2D border in borders)
            {
                int borderId = border.Closed ? num1++ : num2--;
                for (int index = border.Count - 1; index > 0; --index)
                {
                    class818List1.Add(new Class811.Class818(borderId, matrix3D1.Transform(border[index]), matrix3D1.Transform(border[index - 1])));
                }
                if (border.Closed && border.Count >= 3)
                {
                    class818List1.Add(new Class811.Class818(borderId, matrix3D1.Transform(border[0]), matrix3D1.Transform(border[border.Count - 1])));
                }
            }
            if (class818List1.Count == 0)
            {
                return(new List <Segment2D[]>());
            }
            class818List1.Sort((IComparer <Class811.Class818>)Class811.class816_0);
            List <Class811.Class818> class818List2 = new List <Class811.Class818>();
            double y1   = class818List1[0].point2D_0.Y;
            double num3 = double.NegativeInfinity;

            foreach (Class811.Class818 class818 in class818List1)
            {
                if (class818.point2D_1.Y > num3)
                {
                    num3 = class818.point2D_1.Y;
                }
            }
            double             num4 = System.Math.Ceiling(y1 / vector2D.Y);
            double             x    = vector2D.X * num4;
            double             y2   = vector2D.Y * num4;
            List <Segment2D[]> segment2DArrayList = new List <Segment2D[]>();

            for (; y2 <= num3; y2 += vector2D.Y)
            {
                while (class818List1.Count > 0 && class818List1[0].point2D_0.Y <= y2)
                {
                    Class811.Class818 class818 = class818List1[0];
                    class818List1.RemoveAt(0);
                    if (class818.point2D_1.Y > y2)
                    {
                        class818List2.Add(class818);
                    }
                }
                List <Class811.Class819> intersections = new List <Class811.Class819>();
                for (int index = class818List2.Count - 1; index >= 0; --index)
                {
                    Class811.Class818 class818 = class818List2[index];
                    if (class818.point2D_1.Y <= y2)
                    {
                        class818List2.RemoveAt(index);
                    }
                    else
                    {
                        intersections.Add(class818.method_0(y2));
                    }
                }
                if (intersections.Count >= 2)
                {
                    intersections.Sort();
                    if (intersections.Count % 2 != 0)
                    {
                        Class811.smethod_10(intersections);
                    }
                    for (int index = intersections.Count - 1; index > 0; --index)
                    {
                        if (intersections[index].double_0 == intersections[index - 1].double_0)
                        {
                            intersections.RemoveAt(index);
                            intersections.RemoveAt(--index);
                        }
                    }
                    if (intersections.Count > 0)
                    {
                        if (dashPatternLength > 0.0)
                        {
                            List <Pair <double> > mappedDashes = new List <Pair <double> >();
                            int num5 = intersections.Count / 2;
                            for (int index = 0; index < num5; ++index)
                            {
                                Class811.Class819 class819_1 = intersections[2 * index];
                                Class811.Class819 class819_2 = intersections[2 * index + 1];
                                Class811.smethod_9(mappedDashes, x, class819_1.double_0, class819_2.double_0, dashes, dashPatternLength);
                            }
                            if (mappedDashes.Count > 0)
                            {
                                Segment2D[] segment2DArray = new Segment2D[mappedDashes.Count];
                                for (int index = 0; index < mappedDashes.Count; ++index)
                                {
                                    Point2D point1 = new Point2D(mappedDashes[index].First, y2);
                                    Point2D point2 = new Point2D(mappedDashes[index].Second, y2);
                                    segment2DArray[index] = new Segment2D(matrix3D2.Transform(point1), matrix3D2.Transform(point2));
                                }
                                segment2DArrayList.Add(segment2DArray);
                            }
                        }
                        else
                        {
                            Segment2D[] segment2DArray = new Segment2D[intersections.Count / 2];
                            for (int index = 0; index < intersections.Count; index += 2)
                            {
                                Point2D point1 = new Point2D(intersections[index].double_0, y2);
                                Point2D point2 = new Point2D(intersections[index + 1].double_0, y2);
                                segment2DArray[index / 2] = new Segment2D(matrix3D2.Transform(point1), matrix3D2.Transform(point2));
                            }
                            segment2DArrayList.Add(segment2DArray);
                        }
                    }
                }
                x += vector2D.X;
            }
            return(segment2DArrayList);
        }
Ejemplo n.º 17
0
 /// <summary>
 /// Constructor
 /// </summary>
 public TrackingAction() : base()
 {
     Constraints     = new Transformation3D();
     InvertTransform = new Transformation3D();
 }
Ejemplo n.º 18
0
        public static Matrix3D GetCoordSystem(Vector2D xaxis)
        {
            Vector2D yaxis = new Vector2D(xaxis.Y, -xaxis.X);

            return(Transformation3D.GetCoordSystem(xaxis, yaxis));
        }
Ejemplo n.º 19
0
 internal void TransformMe(TransformConfig config, Matrix4D transform, CommandGroup undoGroup)
 {
     this.TransformMe(config, Transformation3D.From(transform), undoGroup);
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Constructor
 /// </summary>
 public myCharacterMovement() : base()
 {
     Constraints     = new Transformation3D();
     InvertTransform = new Transformation3D();
 }
Ejemplo n.º 21
0
	/// <summary>
	/// Constructor
	/// </summary>
	public TrackingAction() : base()
	{
		Constraints = new Transformation3D();			
		InvertTransform = new Transformation3D();
	}
Ejemplo n.º 22
0
 public void Render(Transformation3D camera, in Vector3 cameraPosition)
Ejemplo n.º 23
0
        public static Matrix3D?GetTransformation(
            IShape2D shape1,
            IShape2D shape2,
            double accuracy)
        {
            if (!shape1.HasSegments || !shape2.HasSegments)
            {
                return(new Matrix3D?());
            }
            ISegment2DIterator iterator1 = shape1.CreateIterator();
            ISegment2DIterator iterator2 = shape2.CreateIterator();

            if (iterator1.TotalPointCount != iterator2.TotalPointCount || iterator1.TotalSegmentCount != iterator2.TotalSegmentCount)
            {
                return(new Matrix3D?());
            }
            if (iterator1.MoveNext() && iterator2.MoveNext())
            {
                Point2D[] point2DArray1 = new Point2D[iterator1.TotalPointCount];
                Point2D[] point2DArray2 = new Point2D[iterator2.TotalPointCount];
                double    num1          = accuracy * accuracy;
                if (iterator1.Current(point2DArray1, 0) == iterator2.Current(point2DArray2, 0))
                {
                    Matrix3D?nullable = new Matrix3D?();
                    int      offset   = 1;
                    if (!iterator1.MoveNext() || !iterator2.MoveNext())
                    {
                        return(new Matrix3D?(Transformation3D.Translation(point2DArray2[0] - point2DArray1[0])));
                    }
                    do
                    {
                        int         num2         = offset;
                        SegmentType segmentType1 = iterator1.Current(point2DArray1, offset);
                        SegmentType segmentType2 = iterator2.Current(point2DArray2, offset);
                        if (segmentType1 == segmentType2)
                        {
                            offset += GeneralShape2D.int_1[(int)segmentType1];
                            if (!nullable.HasValue && offset >= 3)
                            {
                                nullable = ShapeTool.smethod_0(point2DArray1, point2DArray2);
                                num2     = 3;
                            }
                            if (nullable.HasValue)
                            {
                                int index = num2;
                                while (true)
                                {
                                    if (index < offset)
                                    {
                                        if ((nullable.Value.Transform(point2DArray1[index]) - point2DArray2[index]).GetLengthSquared() <= num1)
                                        {
                                            ++index;
                                        }
                                        else
                                        {
                                            goto label_15;
                                        }
                                    }
                                    else
                                    {
                                        break;
                                    }
                                }
                            }
                        }
                        else
                        {
                            goto label_14;
                        }
                    }while (iterator1.MoveNext() && iterator2.MoveNext());
                    goto label_16;
label_14:
                    return(new Matrix3D?());

label_15:
                    return(new Matrix3D?());

label_16:
                    return(nullable);
                }
            }
            return(new Matrix3D?());
        }
Ejemplo n.º 24
0
 public Matrix3D GetShapeInsertionTransformation(double ltScaling)
 {
     return(Transformation3D.Scaling2D(ltScaling) * Transformation3D.Translation(this.vector2D_0) * Transformation3D.Rotate(this.double_2) * Transformation3D.Scaling2D(this.double_1));
 }
Ejemplo n.º 25
0
        private WoutWareGlyph method_4(Stream stream, byte[] buffer)
        {
            char           letter         = WoutWareFont.smethod_5(stream, buffer);
            Vector2D       advance        = WoutWareFont.smethod_7(stream, buffer);
            GeneralShape2D generalShape2D = new GeneralShape2D();
            int            num;

            while (true)
            {
                num = stream.ReadByte();
                if (num >= 0)
                {
                    WoutWareFont.Enum12 enum12 = (WoutWareFont.Enum12)num;
                    if ((uint)enum12 <= 100U)
                    {
                        switch (enum12)
                        {
                        case WoutWareFont.Enum12.const_5:
                            goto label_11;

                        case WoutWareFont.Enum12.const_4:
                            double m00_1 = (double)WoutWareFont.smethod_3(stream, buffer);
                            double m01   = (double)WoutWareFont.smethod_3(stream, buffer);
                            double m02_1 = (double)WoutWareFont.smethod_3(stream, buffer);
                            double m10   = (double)WoutWareFont.smethod_3(stream, buffer);
                            double m11_1 = (double)WoutWareFont.smethod_3(stream, buffer);
                            double m12_1 = (double)WoutWareFont.smethod_3(stream, buffer);
                            generalShape2D.Append(this.ilist_0[WoutWareFont.smethod_1(stream, buffer)], false, new Matrix3D(m00_1, m01, m02_1, m10, m11_1, m12_1, 0.0, 0.0, 1.0));
                            continue;

                        case WoutWareFont.Enum12.const_0:
                            generalShape2D.Append(this.ilist_0[WoutWareFont.smethod_1(stream, buffer)], false);
                            continue;

                        default:
                            goto label_12;
                        }
                    }
                    else
                    {
                        switch (enum12)
                        {
                        case WoutWareFont.Enum12.const_3:
                            double m00_2 = (double)WoutWareFont.smethod_3(stream, buffer);
                            double m02_2 = (double)WoutWareFont.smethod_3(stream, buffer);
                            double m11_2 = (double)WoutWareFont.smethod_3(stream, buffer);
                            double m12_2 = (double)WoutWareFont.smethod_3(stream, buffer);
                            generalShape2D.Append(this.ilist_0[WoutWareFont.smethod_1(stream, buffer)], false, new Matrix3D(m00_2, 0.0, m02_2, 0.0, m11_2, m12_2, 0.0, 0.0, 1.0));
                            continue;

                        case WoutWareFont.Enum12.const_2:
                            double x1 = (double)WoutWareFont.smethod_3(stream, buffer);
                            double y1 = (double)WoutWareFont.smethod_3(stream, buffer);
                            generalShape2D.Append(this.ilist_0[WoutWareFont.smethod_1(stream, buffer)], false, Transformation3D.Scaling(x1, y1));
                            continue;

                        case WoutWareFont.Enum12.const_1:
                            double x2 = (double)WoutWareFont.smethod_3(stream, buffer);
                            double y2 = (double)WoutWareFont.smethod_3(stream, buffer);
                            generalShape2D.Append(this.ilist_0[WoutWareFont.smethod_1(stream, buffer)], false, Transformation3D.Translation(x2, y2));
                            continue;

                        default:
                            goto label_12;
                        }
                    }
                }
                else
                {
                    break;
                }
            }
            throw new IOException("Unexpected end of input!");
label_11:
            IShape2D outline = !generalShape2D.HasSegments ? (IShape2D)NullShape2D.Instance : (IShape2D) new CachedBoundsShape2D((IShape2D)generalShape2D);

            return(new WoutWareGlyph(letter, outline, advance));

label_12:
            throw new IOException("Invalid reference operator " + (object)num);
        }
Ejemplo n.º 26
0
        private static Matrix3D smethod_0(Vector3D xaxis, Vector3D zaxis)
        {
            Vector3D yaxis = Vector3D.CrossProduct(zaxis, xaxis);

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