From 75534804cf1435317e198223f1b3be643ef96737 Mon Sep 17 00:00:00 2001 From: giorgiomarcias Date: Wed, 7 Jan 2015 21:22:34 +0000 Subject: [PATCH] Using only the laplacian weight lapWeight for the matrix and 1 - lapWeight for the barycentric constraints in the implicit smoother (removed the unusefull face weight). --- vcg/complex/algorithms/implicit_smooth.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/vcg/complex/algorithms/implicit_smooth.h b/vcg/complex/algorithms/implicit_smooth.h index f3d10db2..a6279d19 100644 --- a/vcg/complex/algorithms/implicit_smooth.h +++ b/vcg/complex/algorithms/implicit_smooth.h @@ -50,23 +50,19 @@ public: int numF; std::vector BarycentricW; CoordType TargetPos; - ScalarType facePenalty; FaceConstraint() { numF=-1; - facePenalty=ScalarType(PENALTY); } FaceConstraint(int _numF, const std::vector &_BarycentricW, - const CoordType &_TargetPos, - const ScalarType fPenalty = ScalarType(PENALTY)) + const CoordType &_TargetPos) { numF=_numF; BarycentricW= std::vector (_BarycentricW.begin(),_BarycentricW.end()); TargetPos=_TargetPos; - facePenalty=fPenalty; } }; @@ -185,7 +181,8 @@ private: assert(FaceN>=0); assert(FaceN<(int)mesh.face.size()); assert(mesh.face[FaceN].VN()==(int)SParam.ConstrainedF[i].BarycentricW.size()); - penalty=SParam.ConstrainedF[i].facePenalty; + penalty=ScalarType(1) - SParam.lapWeight; + assert(penalty>ScalarType(0) && penalty