Merge branch 'obj-fix-wrong-indices' into 'master'

Fixed broken indices for some cases of OBJ parsing by using two passes

(Continuing fixing / discussion from https://graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/merge_requests/51)

This merge request is fixing an issue that came up as a follow-up of the following merge request:
 https://graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/merge_requests/51

The problem it fixes occurs for some kinds of OBJ data, where vertices and face data are stored interleaved and, at the same time, the mesh contains some non-manifold geometry.  As non-manifold geometry triggers the on-the-fly creation of new vertices during parsing, the indices from the OBJ file do not match any more and the result gets messed up.

The straightforward solution applied on this branch is to parse to whole OBJ file in two passes, first the vertices and then the material data and faces. This way, possible extra vertices will always be added to the back, not interfering with indices from the OBJ file

I tested the performance on a 1.1 GB OBJ file. The loading time on my machine increased from ~59 seconds to ~65 seconds, so I believe the performance overhead could probably be considered acceptable.

Looking forward to your feedback!


See merge request !84
7 jobs for master in 22 minutes and 27 seconds (queued for 8 seconds)
Status Job ID Name Coverage
  Test
passed #11126
Linux
clang-c++11

00:22:25

passed #11128
Linux
clang-c++98

00:19:58

passed #11131
Linux
cppcheck

00:00:29

passed #11125
Linux
gcc-c++11

00:04:13

passed #11127
Linux
gcc-c++98

00:03:59

passed #11129
Apple
macos-c++11

00:16:30

passed #11130
Apple
macos-c++98

00:15:23