Пример #1
0
void ASMModel::saveToFile(const string& filename)
{
    ModelFileAscii mf;
    mf.openFile(filename.c_str(), "wb");
    saveToFile(mf);
    mf.closeFile();
}
Пример #2
0
void ASMModel::loadFromFile(const string& filename)
{
    ModelFileAscii mf;
    mf.openFile(filename.c_str(), "rb");
    loadFromFile(mf);
    mf.closeFile();
}
Пример #3
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();
    }
}
Пример #4
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();
    }
}