Removed printf and added the standard callback approach
This commit is contained in:
parent
c7f479c580
commit
b2d20dd837
|
@ -163,7 +163,7 @@ private:
|
||||||
{_thr=0;}
|
{_thr=0;}
|
||||||
|
|
||||||
template<class EXTRACTOR_TYPE>
|
template<class EXTRACTOR_TYPE>
|
||||||
void BuildMesh(MeshType &mesh, VolumeType &volume, EXTRACTOR_TYPE &extractor, const float threshold)
|
void BuildMesh(MeshType &mesh, VolumeType &volume, EXTRACTOR_TYPE &extractor, const float threshold, vcg::CallBackPos * cb=0)
|
||||||
{
|
{
|
||||||
Init(volume);
|
Init(volume);
|
||||||
_volume = &volume;
|
_volume = &volume;
|
||||||
|
@ -175,7 +175,9 @@ private:
|
||||||
Begin();
|
Begin();
|
||||||
extractor.Initialize();
|
extractor.Initialize();
|
||||||
for (int j=_bbox.min.Y(); j<(_bbox.max.Y()-1)-1; j+=1)
|
for (int j=_bbox.min.Y(); j<(_bbox.max.Y()-1)-1; j+=1)
|
||||||
{ if((j%10)==0) printf("Marching volume z %i (%i ..%i)\r",j,_bbox.min.Y(),_bbox.max.Y());
|
{
|
||||||
|
|
||||||
|
if(cb && ((j%10)==0) ) cb(j*_bbox.DimY()/100.0,"Marching volume");
|
||||||
|
|
||||||
for (int i=_bbox.min.X(); i<(_bbox.max.X()-1)-1; i+=1)
|
for (int i=_bbox.min.X(); i<(_bbox.max.X()-1)-1; i+=1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue