Commit cd986bc6 authored by Jan Möbius's avatar Jan Möbius

Fixes to obj writer

* Missing / when skipping texture coordinates 
* wrong identifier for vertex normals



git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@215 fdac6126-5c0c-442c-9429-916003d36597
parent 2bd9e5aa
......@@ -259,7 +259,7 @@ write(std::fstream& _out, BaseExporter& _be, Options _opt) const
_out << "v " << v[0] <<" "<< v[1] <<" "<< v[2] << std::endl;
if (_opt.check(Options::VertexNormal))
_out << "n " << n[0] <<" "<< n[1] <<" "<< n[2] << std::endl;
_out << "vn " << n[0] <<" "<< n[1] <<" "<< n[2] << std::endl;
if (_opt.check(Options::VertexTexCoord))
_out << "vt " << t[0] <<" "<< t[1] << std::endl;
......@@ -299,11 +299,15 @@ write(std::fstream& _out, BaseExporter& _be, Options _opt) const
idx = vhandles[j].idx() + 1;
_out << " " << idx;
_out << "/" ;
if (_opt.check(Options::VertexTexCoord))
_out << "/" << idx;
_out << idx;
_out << "/" ;
if ( _opt.check(Options::VertexNormal) )
_out << "/" << idx;
_out << idx;
}
_out << std::endl;
......
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