Corrected a small bug in the reading of poligonal color and quality (it was not copied in all the triangles of the triangulated poligon)

This commit is contained in:
Paolo Cignoni 2014-06-17 13:41:26 +00:00
parent 009c6f4f7f
commit 3e4c020642
1 changed files with 904 additions and 900 deletions

View File

@ -837,10 +837,14 @@ static int Open( OpenMeshType &m, const char * filename, PlyInfo &pi )
(*fi).V(k) = index[ fa.v[1+qq+k] ];
}
if( pi.mask & Mask::IOM_FACEQUALITY )
(*fi).Q() = (typename OpenMeshType::FaceType::QualityType)
fa.q;
if( pi.mask & Mask::IOM_FACECOLOR )
(*fi).C() = Color4b(fa.r,fa.g,fa.b,255);
// tag faux vertices of extra faces
fi->SetF(0);
if (qq!=fa.size-3) fi->SetF(2);
if(qq<(fa.size-4)) fi->SetF(2);
for(k=0;k<pi.fdn;k++)
memcpy((char *)(&(*fi)) + pi.FaceData[k].offset1,