Example #1
0
        public FoamModel Load(Stream S, string FileName)
        {
            FoamMesh[] Meshes = null;

            using (BinaryReader Reader = new BinaryReader(S, Encoding.ASCII, true)) {
                DPMHeader Header = Reader.ReadStructReverse <DPMHeader>();

                Reader.Seek(Header.ofs_meshs);
                Meshes = Reader.ReadStructArrayReverse <DPMMesh>((int)Header.num_meshs).Select(M => LoadMesh(Reader, M)).ToArray();
            }

            return(null);
        }
Example #2
0
        public bool CanLoad(Stream S, string FileName)
        {
            // not implemented yet
            return(false);

            using (BinaryReader Reader = new BinaryReader(S, Encoding.ASCII, true)) {
                DPMHeader Header = Reader.ReadStructReverse <DPMHeader>();

                if (Header.GetMagic() == "DARKPLACESMODEL")
                {
                    return(true);
                }
            }

            return(false);
        }