Exemple #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 Mesh, we can read that.
                if (next.type == ChunkType.CHUNK_OBJMESH)
                {
                    ObjectMeshChunk chunk = new ObjectMeshChunk();
                    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));
        }
Exemple #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 Mesh, we can read that.
                if (next.type == ChunkType.CHUNK_OBJMESH)
                {
                    ObjectMeshChunk chunk = new ObjectMeshChunk();
                    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));
        }