Ejemplo n.º 1
0
void ASMModel::saveToFile(const string& filename)
{
    ModelFileAscii mf;
    mf.openFile(filename.c_str(), "wb");
    saveToFile(mf);
    mf.closeFile();
}
Ejemplo n.º 2
0
void ASMModel::loadFromFile(const string& filename)
{
    ModelFileAscii mf;
    mf.openFile(filename.c_str(), "rb");
    loadFromFile(mf);
    mf.closeFile();
}
Ejemplo n.º 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();
    }
}
Ejemplo n.º 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();
    }
}