fixed bug to prevent deleted faces rasterization

This commit is contained in:
Luigi Malomo 2010-12-05 18:22:45 +00:00
parent a464fed6ae
commit 9d1e54a140
1 changed files with 10 additions and 8 deletions

View File

@ -1376,11 +1376,13 @@ static void Texture(MetroMesh & m, VertexSampler &ps, int textureWidth, int text
printf("Similar Triangles face sampling\n");
for(fi=m.face.begin(); fi != m.face.end(); fi++)
if (!fi->IsD())
{
Point2f ti[3];
for(int i=0;i<3;++i)
ti[i]=Point2f((*fi).WT(i).U() * textureWidth - 0.5, (*fi).WT(i).V() * textureHeight - 0.5);
// +/- 0.5 constants are used to obtain correct texture mapping
// - 0.5 constants are used to obtain correct texture mapping
SingleFaceRaster(*fi, ps, ti[0],ti[1],ti[2], correctSafePointsBaryCoords);
}
}