Esempio n. 1
0
 public SortNormalBlock(ByteBufferReader reader)
 {
     reader.FastForward(sizeof(int));
     size           = reader.ReadInt();
     planeNormal    = reader.ReadVector3();
     planePoint     = reader.ReadVector3();
     reserved       = reader.ReadInt();
     frontOffset    = reader.ReadInt();
     backOffset     = reader.ReadInt();
     preListOffset  = reader.ReadInt();
     postListOffset = reader.ReadInt();
     onlineOffset   = reader.ReadInt();
     boundingBoxMin = reader.ReadVector3();
     boundingBoxMax = reader.ReadVector3();
 }
Esempio n. 2
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();
            }
        }