public long ParseVertices(BSP bsp, BinaryReader reader, int count)
        {
            bsp.Vertices = new List <BSP.Vertex>();
            var originalPos = reader.BaseStream.Position;

            for (uint i = 0; i < count; ++i)
            {
                reader.BaseStream.Position = originalPos + (i * VERTEX_SIZE);
                var point_x    = BitConverter.ToSingle(reader.ReadBytes(4).Reverse().ToArray(), 0);
                var point_y    = BitConverter.ToSingle(reader.ReadBytes(4).Reverse().ToArray(), 0);
                var point_z    = BitConverter.ToSingle(reader.ReadBytes(4).Reverse().ToArray(), 0);
                var first_edge = BitConverter.ToInt32(reader.ReadBytes(4).Reverse().ToArray(), 0);

                var vert = new BSP.Vertex();

                vert.PointX = point_x;
                vert.PointY = point_y;
                vert.PointZ = point_z;

                vert.FirstEdge = (short)first_edge;

                bsp.Vertices.Add(vert);
            }

            return(originalPos + (count * VERTEX_SIZE));
        }
        public long ParseVertices(BSP bsp, BinaryReader reader, int count)
        {
            bsp.Vertices = new List<BSP.Vertex>();
            var originalPos = reader.BaseStream.Position;

            for (uint i = 0; i < count; ++i)
            {
                reader.BaseStream.Position = originalPos + (i * VERTEX_SIZE);
                var point_x = BitConverter.ToSingle(reader.ReadBytes(4).Reverse().ToArray(), 0);
                var point_y = BitConverter.ToSingle(reader.ReadBytes(4).Reverse().ToArray(), 0);
                var point_z = BitConverter.ToSingle(reader.ReadBytes(4).Reverse().ToArray(), 0);
                var first_edge = BitConverter.ToInt32(reader.ReadBytes(4).Reverse().ToArray(), 0);

                var vert = new BSP.Vertex();

                vert.PointX = point_x;
                vert.PointY = point_y;
                vert.PointZ = point_z;

                vert.FirstEdge = (short)first_edge;

                bsp.Vertices.Add(vert);
            }

            return originalPos + (count * VERTEX_SIZE);
        }