public static MeshDef Load(FileSystem fs, string path) { if (path.EndsWith(".obj")) { return(WavefrontObj.Load(fs, path)); } else if (path.EndsWith(".mdf")) { return(MeshDefFile.Load(fs, path).mapBones()); } else if (path.EndsWith(".3ds")) { return(load.Loader_3ds.Load(fs, path)); } else { throw new UserException(path + " does not use a known fileformat"); } }
public static void Save(Stream s, MeshDef def) { MeshDefFile.Write(s, def); }