Commit 83e54964 authored by Philip Trettner's avatar Philip Trettner
Browse files

Merge branch 'fix-obj-line-parsing' into 'develop'

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

See merge request !23
parents f04cab48 84bb746d
......@@ -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