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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user