minor warning solved

This commit is contained in:
nico 2017-12-19 00:56:57 +11:00
parent 17d89e705a
commit 6dd5244ddb
3 changed files with 28 additions and 31 deletions

View File

@ -186,7 +186,7 @@ static void FaceFromVertex( MeshType &m)
for(FaceIterator fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD()) for(FaceIterator fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD())
{ {
(*fi).Q() =0; (*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() += (*fi).V(i)->Q();
(*fi).Q()/=(FaceQualityType)(*fi).VN(); (*fi).Q()/=(FaceQualityType)(*fi).VN();
} }

View File

@ -341,11 +341,8 @@ public:
Ndir=4; Ndir=4;
curvRing=2; curvRing=2;
alpha_curv=0.0; alpha_curv=0.0;
align_borders=false; align_borders=false;
SmoothM=SMMiq; SmoothM=SMMiq;
sharp_thr=0.0; sharp_thr=0.0;
curv_thr=0.4; curv_thr=0.4;
} }
@ -488,10 +485,10 @@ public:
//for the moment only cross and line field //for the moment only cross and line field
//initialize direction by curvature if needed //initialize direction by curvature if needed
if ((SParam.alpha_curv>0)|| // if ((SParam.alpha_curv>0)||
(SParam.sharp_thr>0)|| // (SParam.sharp_thr>0)||
(SParam.curv_thr>0)) // (SParam.curv_thr>0))
InitByCurvature(mesh,SParam.curvRing); InitByCurvature(mesh,SParam.curvRing);
SelectConstraints(mesh,SParam); SelectConstraints(mesh,SParam);
//then do the actual smooth //then do the actual smooth

View File

@ -109,33 +109,33 @@ public:
printf("%d\n",period); printf("%d\n",period);
fscanf(f,"%c",&final); fscanf(f,"%c",&final);
fseek(f, -1, SEEK_CUR); fseek(f, -1, SEEK_CUR);
printf("%s\n",&final[0]); //printf("%s\n",&final[0]);
}while(strcmp(final,"\"")!=0); }while(strcmp(final,"\"")!=0);
// printf("%s\n",skipstr); // printf("%s\n",skipstr);
fflush(stdout); fflush(stdout);
// for (int i=0;i<mesh.fn;i++) for (int i=0;i<mesh.fn;i++)
// { {
// int i0=-1; int i0=-1;
// int i1=-1; int i1=-1;
// int i2=-1; int i2=-1;
// double u0,v0,u1,v1,u2,v2; double u0,v0,u1,v1,u2,v2;
// int readed1=fscanf(f,"%d %d %d %lf %lf %lf %lf %lf %lf",&i0,&i1,&i2,&u0,&v0,&u1,&v1,&u2,&v2); int readed1=fscanf(f,"%d %d %d %lf %lf %lf %lf %lf %lf",&i0,&i1,&i2,&u0,&v0,&u1,&v1,&u2,&v2);
// assert(readed1==9); assert(readed1==9);
// vcg::Point2<ScalarType> UV[3]; vcg::Point2<ScalarType> UV[3];
// UV[0]= vcg::Point2<ScalarType>(u0,v0); UV[0]= vcg::Point2<ScalarType>(u0,v0);
// UV[1]= vcg::Point2<ScalarType>(u1,v1); UV[1]= vcg::Point2<ScalarType>(u1,v1);
// UV[2]= vcg::Point2<ScalarType>(u2,v2); UV[2]= vcg::Point2<ScalarType>(u2,v2);
// CoordType dir1; CoordType dir1;
// CoordType dir2; CoordType dir2;
// vcg::tri::CrossField<MeshType>::GradientToCross(mesh.face[i],UV[0],UV[1],UV[2],dir1,dir2); vcg::tri::CrossField<MeshType>::GradientToCross(mesh.face[i],UV[0],UV[1],UV[2],dir1,dir2);
// dir1.Normalize(); dir1.Normalize();
// dir2.Normalize(); dir2.Normalize();
// mesh.face[i].PD1()=dir1; mesh.face[i].PD1()=dir1;
// mesh.face[i].PD2()=dir2; mesh.face[i].PD2()=dir2;
// } }
// fclose(f); fclose(f);
// return true; return true;
} }
///load a field on the mesh, it could be a vfield file (per vertex) ///load a field on the mesh, it could be a vfield file (per vertex)