Added some documentation in obj writer

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@216 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2009-10-23 13:15:03 +00:00
parent cd986bc699
commit 2fb72a9955

View File

@@ -284,6 +284,7 @@ write(std::fstream& _out, BaseExporter& _be, Options _opt) const
material = getMaterial(c);
}
// if we are ina a new material block, specify in the file which material to use
if(lastMat != material) {
_out << "usemtl mat" << material << std::endl;
lastMat = material;
@@ -296,16 +297,22 @@ write(std::fstream& _out, BaseExporter& _be, Options _opt) const
for (j=0; j< vhandles.size(); ++j)
{
// Write vertex index
idx = vhandles[j].idx() + 1;
_out << " " << idx;
// write separator
_out << "/" ;
// write vertex texture coordinate index
if (_opt.check(Options::VertexTexCoord))
_out << idx;
// write separator
_out << "/" ;
// write vertex normal index
if ( _opt.check(Options::VertexNormal) )
_out << idx;
}