Yet some other changes to the stat collecting functions for computing the average edge lenght on a mesh.
This commit is contained in:
parent
3d956d8b48
commit
87d01da58f
|
@ -251,12 +251,18 @@ class Stat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ScalarType ComputeFaceEdgeAverage(MeshType & m)
|
static ScalarType ComputeFaceEdgeAverage(MeshType & m)
|
||||||
{
|
{
|
||||||
Distribution<float> h;
|
double sum=0;
|
||||||
ComputeFaceEdgeDistribution(m,h);
|
for(FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi)
|
||||||
return h.Avg();
|
if(!(*fi).IsD())
|
||||||
|
{
|
||||||
|
for(int i=0;i<3;++i)
|
||||||
|
sum+=double(Distance<float>(fi->P0(i),fi->P1(i)));
|
||||||
|
}
|
||||||
|
return sum/(m.fn*3.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // end class
|
}; // end class
|
||||||
|
|
Loading…
Reference in New Issue