From b9949e8910a9e01dbf9237e0f5e6838205549b8b Mon Sep 17 00:00:00 2001 From: cnr-isti-vclab Date: Thu, 29 Jan 2009 11:12:57 +0000 Subject: [PATCH] Added a custom macro to disable qt calls if not needed, just a temporary solution --- vcg/complex/trimesh/point_sampling.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vcg/complex/trimesh/point_sampling.h b/vcg/complex/trimesh/point_sampling.h index 14ae4fa6..5cf434e9 100644 --- a/vcg/complex/trimesh/point_sampling.h +++ b/vcg/complex/trimesh/point_sampling.h @@ -787,9 +787,9 @@ static void Poissondisk(MetroMesh &origMesh, VertexSampler &ps, MetroMesh &monte int sizeY = vcg::math::Max(1.0f,origMesh.bbox.DimY() / cellsize); int sizeZ = vcg::math::Max(1.0f,origMesh.bbox.DimZ() / cellsize); Point3i gridsize(sizeX, sizeY, sizeZ); - +#ifndef NO_QT qDebug("PDS: radius %f Grid:(%i %i %i) ",diskRadius,sizeX,sizeY,sizeZ); - +#endif // initialize spatial hash to index pre-generated samples VertexIterator vi; montecarloSHT.InitEmpty(origMesh.bbox, gridsize); @@ -798,8 +798,9 @@ static void Poissondisk(MetroMesh &origMesh, VertexSampler &ps, MetroMesh &monte montecarloSHT.Add(&(*vi)); verticescounter[0]++; } - +#ifndef NO_QT qDebug("PDS: Completed montercarloSHT, inserted %i vertex in %i cells", montecarloMesh.vn, montecarloSHT.AllocatedCells.size()); +#endif // initialize spatial hash table for check poisson-disk radius constrain checkSHT.InitEmpty(origMesh.bbox, gridsize); @@ -926,12 +927,14 @@ static void Poissondisk(MetroMesh &origMesh, VertexSampler &ps, MetroMesh &monte } nextPoints.clear(); +#ifndef NO_QT qDebug("PDS: Completed Level %i, added %i samples",level,samplesaccepted[level]); +#endif level++; } while(level < pp.MAXLEVELS); - +#ifndef NO_QT // write some statistics QFile outfile("C:/temp/poissondisk_statistics.txt"); if (outfile.open(QFile::WriteOnly | QFile::Truncate)) @@ -955,6 +958,7 @@ static void Poissondisk(MetroMesh &origMesh, VertexSampler &ps, MetroMesh &monte } outfile.close(); +#endif } //template