Revision 1f7801656c9e30ee4b174b6dede619f383555b5f authored by IuricichF on 14 May 2016, 20:29:04 UTC, committed by IuricichF on 14 May 2016, 20:29:04 UTC
1 parent 1077952
scalarfield.cpp
#include "Mesh.h"
void Mesh::laplacianSmoothing(int iter){
for(int k=0; k<iter; k++){
vector<float> nV(getNumVertex());
for(int i=0;i<getNumVertex(); i++){
vector<int> vv = VV(i);
float value=0;
for(auto v : vv){
value+=getVertex(v).getF();
}
nV[i]=value/(float)vv.size();
}
for(int i=0; i<getNumVertex(); i++)
getVertex(i).setF(nV[i]);
}
}

Computing file changes ...