added bool SmoothSelected in VertexCoordScaleDependentLaplacian_Fujiwara
This commit is contained in:
parent
a9e78a1cf5
commit
c9194ae005
|
@ -125,7 +125,7 @@ static void VertexCoordLaplacianAngleWeighted(MeshType &m, int step, ScalarType
|
|||
// Note the delta parameter is in a absolute unit
|
||||
// to get stability it should be a small percentage of the shortest edge.
|
||||
|
||||
static void VertexCoordScaleDependentLaplacian_Fujiwara(MeshType &m, int step, ScalarType delta)
|
||||
static void VertexCoordScaleDependentLaplacian_Fujiwara(MeshType &m, int step, ScalarType delta,bool SmoothSelected=false)
|
||||
{
|
||||
SimpleTempData<typename MeshType::VertContainer, ScaleLaplacianInfo > TD(m.vert);
|
||||
ScaleLaplacianInfo lpz;
|
||||
|
@ -181,8 +181,11 @@ static void VertexCoordScaleDependentLaplacian_Fujiwara(MeshType &m, int step, S
|
|||
|
||||
for(vi=m.vert.begin();vi!=m.vert.end();++vi)
|
||||
if(!(*vi).IsD() && TD[*vi].LenSum>0 )
|
||||
{
|
||||
if(!SmoothSelected || (*vi).IsS())
|
||||
(*vi).P() = (*vi).P() + (TD[*vi].PntSum/TD[*vi].LenSum)*delta;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue