I have a question about reading multiple objects in Wavefront .obj files, the obj files may contain many object groups such as:
#
# object example_1
#
v 0.0 0.0 0.0
v 1.0 0.0 0.0
v 1.0 0.0 1.0
v 0.0 0.0 1.0
# 4 vertices
g example_1
f 1 4 3
f 3 2 1
# 2 faces
#
# object example_2
#
v 2.0 2.0 2.0
v 3.0 2.0 2.0
v 1.0 1.0 3.0
v 2.0 2.0 2.0
# 4 vertices
g example_2
f 1 4 3
f 3 2 1
# 2 faces
The igl::readOBJ function only returns one single object, so the group information is lost. Is there an easy way to read this kind of obj file as grouped objects?
I have a question about reading multiple objects in Wavefront .obj files, the obj files may contain many object groups such as:
The igl::readOBJ function only returns one single object, so the group information is lost. Is there an easy way to read this kind of obj file as grouped objects?