diff --git a/src/OpenMesh/Core/IO/writer/OBJWriter.cc b/src/OpenMesh/Core/IO/writer/OBJWriter.cc index f134b89e..42375377 100644 --- a/src/OpenMesh/Core/IO/writer/OBJWriter.cc +++ b/src/OpenMesh/Core/IO/writer/OBJWriter.cc @@ -216,8 +216,6 @@ _OBJWriter_:: write(std::ostream& _out, BaseExporter& _be, const Options& _writeOptions, std::streamsize _precision) const { unsigned int idx; - Vec3f v, n; - Vec2f t; VertexHandle vh; std::vector vhandles; bool useMatrial = false; @@ -296,7 +294,7 @@ write(std::ostream& _out, BaseExporter& _be, const Options& _writeOptions, std:: for (size_t i=0, nV=_be.n_vertices(); i(i)); - t = _be.texcoord(vh); + Vec2f t = _be.texcoord(vh); texMap[t] = static_cast(i); } } @@ -313,18 +311,27 @@ write(std::ostream& _out, BaseExporter& _be, const Options& _writeOptions, std:: } } - // vertex data (point, normals, texcoords) + const bool normal_double = _be.is_normal_double(); + const bool point_double = _be.is_point_double(); for (size_t i=0, nV=_be.n_vertices(); i::max();