Menu

#54 Wrong vertex color info while parsing OBJ file

v1.0_(example)
open
nobody
1
2016-02-22
2016-02-22
Anonymous
No

While parsing OBJ file, finding the vertex color information is wrong.

In file vcglib/wrap/io_trimesh/import_obj.h,

static bool LoadMask(const char * filename, Info &oi)
{
...
oi.numVertices++;
if (line.size() >= 7) bHasPerVertexColor = true;
...
}

Corrected Code
.--------------------

static bool LoadMask(const char * filename, Info &oi)
{
...
oi.numVertices++;
//if (line.size() >= 7)
int count = std::count(line.begin(), line.end(), ' ');
if (count >= 6) bHasPerVertexColor = true;
...
}

Please make the changes included in the next release.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB