up-to-date method Save.

This commit is contained in:
Paolo Cignoni cignoni 2005-11-09 23:40:46 +00:00
parent 276b1fa7c5
commit 205e1f04e5

View File

@ -47,6 +47,9 @@ namespace vcg
static bool Save(SaveMeshType &m, const char * filename , bool binary =true, const char *objectname=0)
{
if(m.vert.size() == 0)return false;
if(m.face.size() == 0)return false;
if(binary)
{
return false;
@ -56,7 +59,7 @@ namespace vcg
std::ofstream stream(filename);
if (stream.fail())
return false;
return false;
stream << "#GENERATED BY EXPORT_OBJ" << std::endl;
@ -64,9 +67,7 @@ namespace vcg
stream << std::endl << "#VERTEXS" << std::endl;
VertexIterator vi;
for(vi=m.vert.begin(); vi!=m.vert.end(); ++vi)
{
stream << "v " << (*vi).P()[0] << " " << (*vi).P()[1] << " " << (*vi).P()[2] << std::endl;
}
//facce
stream << std::endl << "#FACES" << std::endl;
@ -84,7 +85,6 @@ namespace vcg
}
stream.close();
return true;
}
}