Пример #1
0
        public override void ReadData(Scene scene, BinaryReader stream)
        {
            do
            {
                //	Peep at the next chunk.
                MAXChunkHeader next = MAXChunkHeader.Peep(stream);

                //	If it's an Object Block, we can read that.
                if (next.type == ChunkType.CHUNK_OBJBLOCK)
                {
                    ObjectBlockChunk chunk = new ObjectBlockChunk();
                    chunk.Read(scene, stream);
                }
                else
                {
                    //	We don't know what this chunk is, so just read the generic one.
                    MAXChunk chunk = new MAXChunk();
                    chunk.Read(scene, stream);
                }
            } while (MoreChunks(stream));
        }
Пример #2
0
        public override void ReadData(Scene scene, BinaryReader stream)
        {
            do
            {
                //	Peep at the next chunk.
                MAXChunkHeader next = MAXChunkHeader.Peep(stream);

                //	If it's an Object Block, we can read that.
                if(next.type == ChunkType.CHUNK_OBJBLOCK)
                {
                    ObjectBlockChunk chunk = new ObjectBlockChunk();
                    chunk.Read(scene, stream);
                }
                else
                {
                    //	We don't know what this chunk is, so just read the generic one.
                    MAXChunk chunk = new MAXChunk();
                    chunk.Read(scene, stream);
                }

            } while (MoreChunks(stream));
        }