avoided computing curvature if not needed
This commit is contained in:
parent
b81e2e98bc
commit
8147097df8
|
@ -492,13 +492,21 @@ 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);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SelectConstraints(mesh,SParam);
|
||||||
|
vcg::tri::CrossField<MeshType>::PropagateFromSelF(mesh);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//then do the actual smooth
|
//then do the actual smooth
|
||||||
SmoothDirections(mesh,SParam.Ndir,SParam.SmoothM,true,SParam.alpha_curv);
|
SmoothDirections(mesh,SParam.Ndir,SParam.SmoothM,true,SParam.alpha_curv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue