예제 #1
0
 public PlacedText(Model.ColoredVertex vertex, string text, float alignment, float size)
 {
     this.Vertex    = vertex;
     this.Text      = text;
     this.Alignment = alignment;
     this.Size      = size;
 }
예제 #2
0
            public static new Primitives ReadFrom(System.IO.BinaryReader reader)
            {
                ColoredVertex[] vertices = new Model.ColoredVertex[reader.ReadInt32()];
                for (int i = 0; i < vertices.Length; i++)
                {
                    vertices[i] = Model.ColoredVertex.ReadFrom(reader);
                }

                Model.PrimitiveType primitiveType;
                switch (reader.ReadInt32())
                {
                case 0:
                    primitiveType = Model.PrimitiveType.Lines;
                    break;

                case 1:
                    primitiveType = Model.PrimitiveType.Triangles;
                    break;

                default:
                    throw new System.Exception("Unexpected tag value");
                }

                var result = new Primitives(vertices, primitiveType);

                return(result);
            }