From 2fb72a9955dfa1cedb271cf1899c7c00bf0edfd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 23 Oct 2009 13:15:03 +0000 Subject: [PATCH] Added some documentation in obj writer git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@216 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Core/IO/writer/OBJWriter.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/OpenMesh/Core/IO/writer/OBJWriter.cc b/src/OpenMesh/Core/IO/writer/OBJWriter.cc index db100c57..96a23037 100644 --- a/src/OpenMesh/Core/IO/writer/OBJWriter.cc +++ b/src/OpenMesh/Core/IO/writer/OBJWriter.cc @@ -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; }