From 6dd5244ddb8cfdcbec1e67d8ebb3190d99b44409 Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 19 Dec 2017 00:56:57 +1100 Subject: [PATCH] minor warning solved --- vcg/complex/algorithms/update/quality.h | 2 +- wrap/igl/smooth_field.h | 11 +++--- wrap/io_trimesh/import_field.h | 46 ++++++++++++------------- 3 files changed, 28 insertions(+), 31 deletions(-) diff --git a/vcg/complex/algorithms/update/quality.h b/vcg/complex/algorithms/update/quality.h index 9df78464..16801750 100644 --- a/vcg/complex/algorithms/update/quality.h +++ b/vcg/complex/algorithms/update/quality.h @@ -186,7 +186,7 @@ static void FaceFromVertex( MeshType &m) for(FaceIterator fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD()) { (*fi).Q() =0; - for (size_t i=0;i<(*fi).VN();i++) + for (int i=0;i<(*fi).VN();i++) (*fi).Q() += (*fi).V(i)->Q(); (*fi).Q()/=(FaceQualityType)(*fi).VN(); } diff --git a/wrap/igl/smooth_field.h b/wrap/igl/smooth_field.h index e5e1d0dd..cb421cfa 100644 --- a/wrap/igl/smooth_field.h +++ b/wrap/igl/smooth_field.h @@ -341,11 +341,8 @@ public: Ndir=4; curvRing=2; alpha_curv=0.0; - align_borders=false; - SmoothM=SMMiq; - sharp_thr=0.0; curv_thr=0.4; } @@ -488,10 +485,10 @@ public: //for the moment only cross and line field //initialize direction by curvature if needed - if ((SParam.alpha_curv>0)|| - (SParam.sharp_thr>0)|| - (SParam.curv_thr>0)) - InitByCurvature(mesh,SParam.curvRing); +// if ((SParam.alpha_curv>0)|| +// (SParam.sharp_thr>0)|| +// (SParam.curv_thr>0)) + InitByCurvature(mesh,SParam.curvRing); SelectConstraints(mesh,SParam); //then do the actual smooth diff --git a/wrap/io_trimesh/import_field.h b/wrap/io_trimesh/import_field.h index 2ba37c58..d7c5ad23 100644 --- a/wrap/io_trimesh/import_field.h +++ b/wrap/io_trimesh/import_field.h @@ -109,33 +109,33 @@ public: printf("%d\n",period); fscanf(f,"%c",&final); fseek(f, -1, SEEK_CUR); - printf("%s\n",&final[0]); + //printf("%s\n",&final[0]); }while(strcmp(final,"\"")!=0); // printf("%s\n",skipstr); fflush(stdout); - // for (int i=0;i UV[3]; - // UV[0]= vcg::Point2(u0,v0); - // UV[1]= vcg::Point2(u1,v1); - // UV[2]= vcg::Point2(u2,v2); - // CoordType dir1; - // CoordType dir2; - // vcg::tri::CrossField::GradientToCross(mesh.face[i],UV[0],UV[1],UV[2],dir1,dir2); - // dir1.Normalize(); - // dir2.Normalize(); - // mesh.face[i].PD1()=dir1; - // mesh.face[i].PD2()=dir2; - // } - // fclose(f); - // return true; + for (int i=0;i UV[3]; + UV[0]= vcg::Point2(u0,v0); + UV[1]= vcg::Point2(u1,v1); + UV[2]= vcg::Point2(u2,v2); + CoordType dir1; + CoordType dir2; + vcg::tri::CrossField::GradientToCross(mesh.face[i],UV[0],UV[1],UV[2],dir1,dir2); + dir1.Normalize(); + dir2.Normalize(); + mesh.face[i].PD1()=dir1; + mesh.face[i].PD2()=dir2; + } + fclose(f); + return true; } ///load a field on the mesh, it could be a vfield file (per vertex)