Changed the default of the param and added the automatic reverse of flipped outlines

This commit is contained in:
Paolo Cignoni 2013-03-26 23:02:23 +00:00
parent 5928ca28b6
commit 84b8170401
1 changed files with 5 additions and 3 deletions

View File

@ -226,8 +226,8 @@ public:
///default constructor
Parameters()
{
costFunction = MinWastedSpace;
doubleHorizon=false;
costFunction = LowestHorizon;
doubleHorizon=true;
rotationNum = 16;
cellSize = 8;
}
@ -479,7 +479,9 @@ public:
float totalArea = 0;
for (size_t j = 0; j < polyPointsVec.size(); j++) {
totalArea += tri::OutlineUtil<SCALAR_TYPE>::Outline2Area(polyPointsVec[j]);
float curArea = tri::OutlineUtil<SCALAR_TYPE>::Outline2Area(polyPointsVec[j]);
if(curArea<0) tri::OutlineUtil<SCALAR_TYPE>::ReverseOutline2(polyPointsVec[j]);
totalArea += fabs(curArea);
}
//we first set it to the "optimal" scale