Ejemplo n.º 1
0
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();
    }
}
Ejemplo n.º 2
0
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();
    }
}