Commit 13904a15 authored by Jan Möbius's avatar Jan Möbius

Simplify reader

parent 781063a3
Pipeline #681 passed with stage
...@@ -406,24 +406,19 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt) ...@@ -406,24 +406,19 @@ read(std::istream& _in, BaseImporter& _bi, Options& _opt)
stream >> u; stream >> v; stream >> u; stream >> v;
if ( !stream.fail() ){ if ( !stream.fail() ){
if ( userOptions.vertex_has_texcoord() || userOptions.face_has_texcoord() ) { if ( userOptions.vertex_has_texcoord() || userOptions.face_has_texcoord() ) {
texcoords.push_back(OpenMesh::Vec2f(u, v)); texcoords.push_back(OpenMesh::Vec2f(u, v));
// Can be used for both! // Can be used for both!
fileOptions += Options::VertexTexCoord; fileOptions += Options::VertexTexCoord;
fileOptions += Options::FaceTexCoord; fileOptions += Options::FaceTexCoord;
}
//try to read the w component as it is optional // try to read the w component as it is optional
stream >> w; stream >> w;
if ( !stream.fail() ){ if ( !stream.fail() )
if ( userOptions.vertex_has_texcoord() || userOptions.face_has_texcoord() ) { texcoords3d.push_back(OpenMesh::Vec3f(u, v, w));
texcoords3d.push_back(OpenMesh::Vec3f(u, v, w));
// Can be used for both!
fileOptions += Options::VertexTexCoord;
fileOptions += Options::FaceTexCoord;
}
} }
}else{ }else{
......
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