diff --git a/vcg/complex/algorithms/stat.h b/vcg/complex/algorithms/stat.h index 75a0ba50..3424bc6a 100644 --- a/vcg/complex/algorithms/stat.h +++ b/vcg/complex/algorithms/stat.h @@ -33,6 +33,7 @@ #include #include #include +#include namespace vcg { @@ -163,6 +164,11 @@ public: return barycenter/areaSum; } + static ScalarType ComputeMeshVolume(MeshType & m) + { + Inertia I(m); + return I.Mass(); + } static ScalarType ComputeMeshArea(MeshType & m) {