added detection of wedge normal in LoadMask.

This commit is contained in:
Marco Di Benedetto 2009-03-24 17:14:54 +00:00
parent 7378ad68a3
commit 8a454d266c
1 changed files with 3 additions and 1 deletions

View File

@ -815,6 +815,7 @@ static bool LoadMask(const char * filename, Info &oi)
if (length == 0) return false;
bool bHasPerFaceColor = false;
bool bHasNormals = false;
oi.numVertices=0;
oi.numFaces=0;
@ -835,6 +836,7 @@ static bool LoadMask(const char * filename, Info &oi)
{
if(line[1]==' ') oi.numVertices++;
if(line[1]=='t') oi.numTexCoords++;
if(line[1]=='n') bHasNormals = true;
}
else
if(line[0]=='f') oi.numFaces++;
@ -850,7 +852,7 @@ static bool LoadMask(const char * filename, Info &oi)
oi.mask |= vcg::tri::io::Mask::IOM_FACECOLOR;
}
if(bHasPerFaceColor) oi.mask |= vcg::tri::io::Mask::IOM_FACECOLOR;
if (bHasNormals) oi.mask |= vcg::tri::io::Mask::IOM_WEDGNORMAL;
return true;
}