small improvemnt in stat collection for voronoi atlas

This commit is contained in:
Paolo Cignoni 2012-07-03 10:21:41 +00:00
parent 7e4e023266
commit bfc10096f0
1 changed files with 6 additions and 1 deletions

View File

@ -89,11 +89,14 @@ public:
struct Stat struct Stat
{ {
void clear() { totalTime=unwrapTime=voronoiTime=samplingTime=0;} void clear() { iterNum=totalTime=unwrapTime=voronoiTime=samplingTime=0;}
int totalTime; int totalTime;
int unwrapTime; int unwrapTime;
int voronoiTime; int voronoiTime;
int samplingTime; int samplingTime;
int regionNum;
int iterNum;
}; };
int sampleNum; int sampleNum;
@ -169,6 +172,7 @@ public:
} }
int tp1=clock(); int tp1=clock();
pp.vas.unwrapTime +=tp1-tp0; pp.vas.unwrapTime +=tp1-tp0;
++pp.vas.iterNum;
} }
VoroMesh *rm = new VoroMesh(); VoroMesh *rm = new VoroMesh();
@ -199,6 +203,7 @@ public:
Point2f finalSize; Point2f finalSize;
PolyPacker<float>::PackAsObjectOrientedRect(uvBorders,Point2f(1024.0f,1024.0f),trVec,finalSize); PolyPacker<float>::PackAsObjectOrientedRect(uvBorders,Point2f(1024.0f,1024.0f),trVec,finalSize);
// loop again over all the patches // loop again over all the patches
pp.vas.regionNum=meshRegionVec.size();
for(size_t i=0; i<meshRegionVec.size();++i) for(size_t i=0; i<meshRegionVec.size();++i)
{ {
VoroMesh *rm = meshRegionVec[i]; VoroMesh *rm = meshRegionVec[i];