Ejemplo n.º 1
0
        public FlatPolygonBlock(ByteBufferReader reader)
        {
            reader.FastForward(sizeof(int));
            size        = reader.ReadInt();
            normal      = reader.ReadVector3();
            center      = reader.ReadVector3();
            radius      = reader.ReadFloat();
            vertexCount = reader.ReadInt();
            red         = reader.ReadByte();
            green       = reader.ReadByte();
            blue        = reader.ReadByte();
            pad         = reader.ReadByte();
            vertexMap   = new PolygonVertex[vertexCount];

            for (int i = 0; i < vertexCount; i++)
            {
                vertexMap[i].vertexIndex = reader.ReadUShort();
                vertexMap[i].normalIndex = reader.ReadUShort();
            }
        }