Ejemplo n.º 1
0
        public void ReadFromFile(BinaryReader reader)
        {
            distance          = reader.ReadSingle();
            indexBufferRef    = new Hash(reader);
            vertexDeclaration = (VertexFlags)reader.ReadUInt32();
            vertexBufferRef   = new Hash(reader);
            numVerts          = reader.ReadInt32();
            nZero1            = reader.ReadInt32();

            nPartition = reader.ReadInt32();
            if (nPartition != 0)
            {
                partitionInfo.ReadFromFile(reader);
            }

            matSplitType = reader.ReadInt32();

            if (matSplitType != 0)
            {
                splitInfo.ReadFromFile(reader, matSplitType);
            }

            zeroTail = reader.ReadInt32();
        }
Ejemplo n.º 2
0
        public void ReadFromFile(MemoryStream reader, bool isBigEndian)
        {
            distance          = reader.ReadSingle(isBigEndian);
            indexBufferRef    = new HashName(reader, isBigEndian);
            vertexDeclaration = (VertexFlags)reader.ReadUInt32(isBigEndian);
            vertexBufferRef   = new HashName(reader, isBigEndian);
            numVerts          = reader.ReadInt32(isBigEndian);
            nZero1            = reader.ReadInt32(isBigEndian);

            nPartition = reader.ReadInt32(isBigEndian);
            if (nPartition != 0)
            {
                partitionInfo.ReadFromFile(reader, isBigEndian);
            }

            matSplitType = reader.ReadInt32(isBigEndian);

            if (matSplitType != 0)
            {
                splitInfo.ReadFromFile(reader, isBigEndian, matSplitType);
            }

            zeroTail = reader.ReadInt32(isBigEndian);
        }