minor warning solved
This commit is contained in:
parent
17d89e705a
commit
6dd5244ddb
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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,9 +485,9 @@ 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))
|
||||
// if ((SParam.alpha_curv>0)||
|
||||
// (SParam.sharp_thr>0)||
|
||||
// (SParam.curv_thr>0))
|
||||
InitByCurvature(mesh,SParam.curvRing);
|
||||
|
||||
SelectConstraints(mesh,SParam);
|
||||
|
|
|
@ -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<mesh.fn;i++)
|
||||
// {
|
||||
// int i0=-1;
|
||||
// int i1=-1;
|
||||
// int i2=-1;
|
||||
// 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);
|
||||
// assert(readed1==9);
|
||||
// vcg::Point2<ScalarType> UV[3];
|
||||
// UV[0]= vcg::Point2<ScalarType>(u0,v0);
|
||||
// UV[1]= vcg::Point2<ScalarType>(u1,v1);
|
||||
// UV[2]= vcg::Point2<ScalarType>(u2,v2);
|
||||
// CoordType dir1;
|
||||
// CoordType dir2;
|
||||
// vcg::tri::CrossField<MeshType>::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<mesh.fn;i++)
|
||||
{
|
||||
int i0=-1;
|
||||
int i1=-1;
|
||||
int i2=-1;
|
||||
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);
|
||||
assert(readed1==9);
|
||||
vcg::Point2<ScalarType> UV[3];
|
||||
UV[0]= vcg::Point2<ScalarType>(u0,v0);
|
||||
UV[1]= vcg::Point2<ScalarType>(u1,v1);
|
||||
UV[2]= vcg::Point2<ScalarType>(u2,v2);
|
||||
CoordType dir1;
|
||||
CoordType dir2;
|
||||
vcg::tri::CrossField<MeshType>::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)
|
||||
|
|
Loading…
Reference in New Issue