Commit 2fb72a99 authored by Jan Möbius's avatar Jan Möbius

Added some documentation in obj writer

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@216 fdac6126-5c0c-442c-9429-916003d36597
parent cd986bc6
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment