VCG Library
trimesh_inertia.cpp File Reference

An example of computing the inertia properties of meshes. More...

#include <vcg/complex/complex.h>
#include <wrap/io_trimesh/import_off.h>
#include <vcg/complex/algorithms/inertia.h>
#include <vcg/complex/algorithms/create/platonic.h>

Go to the source code of this file.

Detailed Description

An example of computing the inertia properties of meshes.

Two meshes are created a rectangular box and a torus and their mass properties are computed and shown. The result should match the closed formula for these objects (with a reasonable approximation)

Definition in file trimesh_inertia.cpp.