Skip to content

Commit

Permalink
avoided computing curvature if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
nicopietroni committed May 15, 2019
1 parent b81e2e9 commit 8147097
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions wrap/igl/smooth_field.h
Original file line number Diff line number Diff line change
Expand Up @@ -492,13 +492,21 @@ class FieldSmoother
{
//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))
// //initialize direction by curvature if needed
if ((SParam.alpha_curv>0)||
(SParam.sharp_thr>0)||
(SParam.curv_thr>0))
{
InitByCurvature(mesh,SParam.curvRing);
SelectConstraints(mesh,SParam);
}
else
{
SelectConstraints(mesh,SParam);
vcg::tri::CrossField<MeshType>::PropagateFromSelF(mesh);
}


InitByCurvature(mesh,SParam.curvRing);
SelectConstraints(mesh,SParam);
//then do the actual smooth
SmoothDirections(mesh,SParam.Ndir,SParam.SmoothM,true,SParam.alpha_curv);
}
Expand Down

0 comments on commit 8147097

Please sign in to comment.