void ShapeModel::save(const string& path, bool bin) { if (bin){ ModelFile mf; mf.openFile(path.data(), "wb"); this->saveToFile(mf); mf.closeFile(); } else { ModelFileAscii mf; mf.openFile(path.data(), "w"); this->saveToFile(mf); mf.closeFile(); } }
void ShapeModel::load(const string& path, bool bin) { if (bin){ ModelFile mf; mf.openFile(path.data(), "rb"); this->loadFromFile(mf); mf.closeFile(); } else { ModelFileAscii mf; mf.openFile(path.data(), "r"); this->loadFromFile(mf); mf.closeFile(); } }