Commit 84bb746d authored by Patric Schmitz's avatar Patric Schmitz Committed by Patric Schmitz
Browse files

fix line parsing for OBJs, was not working for single line segments

parent f04cab48
......@@ -345,11 +345,13 @@ void obj_reader<ScalarT>::parse(std::istream& in, Mesh& mesh)
int i0, i1;
line >> i0;
line >> i1;
mesh.edges().add_or_get(mesh[vertex_index(i0 - 1)], mesh[vertex_index(i1 - 1)]);
while (line.good())
{
mesh.edges().add_or_get(mesh[vertex_index(i0 - 1)], mesh[vertex_index(i1 - 1)]);
i0 = i1;
line >> i1;
mesh.edges().add_or_get(mesh[vertex_index(i0 - 1)], mesh[vertex_index(i1 - 1)]);
}
}
......
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