From 25dd36a7048150302d3f7bff73106f7015d051d8 Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 16 May 2008 17:44:31 +0000 Subject: [PATCH] updated to the new temporary data structure --- vcg/complex/trimesh/update/curvature.h | 11 +++++--- wrap/io_trimesh/export_ply.h | 39 +++++--------------------- 2 files changed, 14 insertions(+), 36 deletions(-) diff --git a/vcg/complex/trimesh/update/curvature.h b/vcg/complex/trimesh/update/curvature.h index 24b804ad..7398676f 100644 --- a/vcg/complex/trimesh/update/curvature.h +++ b/vcg/complex/trimesh/update/curvature.h @@ -23,6 +23,9 @@ /**************************************************************************** History $Log: not supported by cvs2svn $ +Revision 1.8 2008/05/14 10:03:29 ganovelli +Point3f->Coordtype + Revision 1.7 2008/04/23 16:37:15 onnis VertexCurvature method added. @@ -292,8 +295,8 @@ Discrete Differential-Geometry Operators for Triangulated 2-Manifolds Mark Meyer VertexIterator vi; typename MeshType::CoordType e01v ,e12v ,e20v; - SimpleTempData TDAreaPtr(m.vert); TDAreaPtr.Start(); - SimpleTempData TDContr(m.vert); TDContr.Start(); + SimpleTempData TDAreaPtr(m.vert); //TDAreaPtr.Start(); + SimpleTempData TDContr(m.vert); //TDContr.Start(); vcg::tri::UpdateNormals::PerVertexNormalized(m); //Compute AreaMix in H (vale anche per K) @@ -386,8 +389,8 @@ Discrete Differential-Geometry Operators for Triangulated 2-Manifolds Mark Meyer } } - TDAreaPtr.Stop(); - TDContr.Stop(); +// TDAreaPtr.Stop(); +// TDContr.Stop(); } diff --git a/wrap/io_trimesh/export_ply.h b/wrap/io_trimesh/export_ply.h index 83217915..af74f0a5 100644 --- a/wrap/io_trimesh/export_ply.h +++ b/wrap/io_trimesh/export_ply.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.30 2008/04/29 11:51:28 corsini +set defaut callback (in save) to null + Revision 1.29 2008/01/24 11:54:23 cignoni passed the callback in the save @@ -419,15 +422,10 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p VertexPointer vp; VertexIterator vi; SimpleTempData indices(m.vert); - if(!m.HasPerVertexFlags()) - indices.Start(); for(j=0,vi=m.vert.begin();vi!=m.vert.end();++vi){ vp=&(*vi); - if(m.HasPerVertexFlags()) - FlagV.push_back(vp->UberFlags()); // Salva in ogni caso flag del vertice - else - indices[j] = j; + indices[j] = j; if( !m.HasPerVertexFlags() || !vp->IsD() ) { @@ -504,8 +502,6 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p fprintf(fpout,"\n"); } - if(m.HasPerVertexFlags()) - vp->UberFlags()=j; // Trucco! Nascondi nei flags l'indice del vertice non deletato! j++; } } @@ -526,18 +522,9 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p { fcnt++; if(binary) { - - if(m.HasPerVertexFlags()){ - vv[0]=fp->cV(0)->UberFlags(); - vv[1]=fp->cV(1)->UberFlags(); - vv[2]=fp->cV(2)->UberFlags(); - } - else - { - vv[0]=indices[fp->cV(0)]; - vv[1]=indices[fp->cV(1)]; - vv[2]=indices[fp->cV(2)]; - } + vv[0]=indices[fp->cV(0)]; + vv[1]=indices[fp->cV(1)]; + vv[2]=indices[fp->cV(2)]; fwrite(&c,1,1,fpout); fwrite(vv,sizeof(int),3,fpout); @@ -610,10 +597,6 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p } else // ***** ASCII ***** { - if(m.HasPerVertexFlags()) - fprintf(fpout,"3 %d %d %d ", - fp->cV(0)->UberFlags(), fp->cV(1)->UberFlags(), fp->cV(2)->UberFlags() ); - else fprintf(fpout,"3 %d %d %d ", indices[fp->cV(0)], indices[fp->cV(1)], indices[fp->cV(2)] ); @@ -691,14 +674,6 @@ static int Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo &p } assert(fcnt==m.fn); fclose(fpout); - - // Recupera i flag originali - if(m.HasPerVertexFlags()) - for(j=0,vi=m.vert.begin();vi!=m.vert.end();++vi) - (*vi).UberFlags()=FlagV[j++]; - else - indices.Stop(); - return 0; }