Methods for computing Polyhedral Mass properties (like inertia tensor, volume, etc) More...
#include <inertia.h>
Public Member Functions | |
Point3< ScalarType > | CenterOfMass () |
Return the Center of Mass (or barycenter) of the mesh. | |
void | CompFaceIntegrals (FaceType &f) |
void | compProjectionIntegrals (FaceType &f) |
void | Compute (MeshType &m) |
Inertia (MeshType &m) | |
Basic constructor. | |
void | InertiaTensor (Matrix33< ScalarType > &J) |
void | InertiaTensor (Eigen::Matrix3d &J) |
void | InertiaTensorEigen (Matrix33< ScalarType > &EV, Point3< ScalarType > &ev) |
Return the Inertia tensor the mesh. | |
ScalarType | Mass () |
Return the Volume (or mass) of the mesh. | |
Static Public Member Functions | |
static void | Covariance (const MeshType &m, vcg::Point3< ScalarType > &bary, vcg::Matrix33< ScalarType > &C) |
Private Types | |
enum | { X = 0, Y = 1, Z = 2 } |
typedef MeshType::ConstFaceIterator | ConstFaceIterator |
typedef MeshType::CoordType | CoordType |
typedef MeshType::FaceContainer | FaceContainer |
typedef MeshType::FaceIterator | FaceIterator |
typedef MeshType::FacePointer | FacePointer |
typedef MeshType::FaceType | FaceType |
typedef MeshType::ScalarType | ScalarType |
typedef MeshType::VertexIterator | VertexIterator |
typedef MeshType::VertexPointer | VertexPointer |
typedef MeshType::VertexType | VertexType |
Private Member Functions | |
ScalarType | CUBE (ScalarType &x) const |
ScalarType | SQR (ScalarType &x) const |
Private Attributes | |
int | A |
int | B |
int | C |
double | Fa |
double | Faa |
double | Faaa |
double | Faab |
double | Fb |
double | Fbb |
double | Fbbb |
double | Fbbc |
double | Fc |
double | Fcc |
double | Fcca |
double | Fccc |
double | P1 |
double | Pa |
double | Paa |
double | Paaa |
double | Paab |
double | Pab |
double | Pabb |
double | Pb |
double | Pbb |
double | Pbbb |
double | T0 |
double | T1 [3] |
double | T2 [3] |
double | TP [3] |
Methods for computing Polyhedral Mass properties (like inertia tensor, volume, etc)
The algorithm is based on a three step reduction of the volume integrals to successively simpler integrals. The algorithm is designed to minimize the numerical errors that can result from poorly conditioned alignment of polyhedral faces. It is also designed for efficiency. All required volume integrals of a polyhedron are computed together during a single walk over the boundary of the polyhedron; exploiting common subexpressions reduces floating point operations.
For more information, check out:
Brian Mirtich, ``Fast and Accurate Computation of Polyhedral Mass Properties,'' journal of graphics tools, volume 1, number 2, 1996
typedef MeshType::ConstFaceIterator vcg::tri::Inertia< MeshType >::ConstFaceIterator [private] |
typedef MeshType::CoordType vcg::tri::Inertia< MeshType >::CoordType [private] |
typedef MeshType::FaceContainer vcg::tri::Inertia< MeshType >::FaceContainer [private] |
typedef MeshType::FaceIterator vcg::tri::Inertia< MeshType >::FaceIterator [private] |
typedef MeshType::FacePointer vcg::tri::Inertia< MeshType >::FacePointer [private] |
typedef MeshType::FaceType vcg::tri::Inertia< MeshType >::FaceType [private] |
typedef MeshType::ScalarType vcg::tri::Inertia< MeshType >::ScalarType [private] |
typedef MeshType::VertexIterator vcg::tri::Inertia< MeshType >::VertexIterator [private] |
typedef MeshType::VertexPointer vcg::tri::Inertia< MeshType >::VertexPointer [private] |
typedef MeshType::VertexType vcg::tri::Inertia< MeshType >::VertexType [private] |
anonymous enum [private] |
vcg::tri::Inertia< MeshType >::Inertia | ( | MeshType & | m | ) | [inline] |
Point3<ScalarType> vcg::tri::Inertia< MeshType >::CenterOfMass | ( | ) | [inline] |
void vcg::tri::Inertia< MeshType >::CompFaceIntegrals | ( | FaceType & | f | ) | [inline] |
void vcg::tri::Inertia< MeshType >::compProjectionIntegrals | ( | FaceType & | f | ) | [inline] |
void vcg::tri::Inertia< MeshType >::Compute | ( | MeshType & | m | ) | [inline] |
static void vcg::tri::Inertia< MeshType >::Covariance | ( | const MeshType & | m, |
vcg::Point3< ScalarType > & | bary, | ||
vcg::Matrix33< ScalarType > & | C | ||
) | [inline, static] |
ScalarType vcg::tri::Inertia< MeshType >::CUBE | ( | ScalarType & | x | ) | const [inline, private] |
void vcg::tri::Inertia< MeshType >::InertiaTensor | ( | Matrix33< ScalarType > & | J | ) | [inline] |
void vcg::tri::Inertia< MeshType >::InertiaTensor | ( | Eigen::Matrix3d & | J | ) | [inline] |
void vcg::tri::Inertia< MeshType >::InertiaTensorEigen | ( | Matrix33< ScalarType > & | EV, |
Point3< ScalarType > & | ev | ||
) | [inline] |
ScalarType vcg::tri::Inertia< MeshType >::Mass | ( | ) | [inline] |
ScalarType vcg::tri::Inertia< MeshType >::SQR | ( | ScalarType & | x | ) | const [inline, private] |
int vcg::tri::Inertia< MeshType >::A [private] |
int vcg::tri::Inertia< MeshType >::B [private] |
int vcg::tri::Inertia< MeshType >::C [private] |
double vcg::tri::Inertia< MeshType >::Fa [private] |
double vcg::tri::Inertia< MeshType >::Faa [private] |
double vcg::tri::Inertia< MeshType >::Faaa [private] |
double vcg::tri::Inertia< MeshType >::Faab [private] |
double vcg::tri::Inertia< MeshType >::Fb [private] |
double vcg::tri::Inertia< MeshType >::Fbb [private] |
double vcg::tri::Inertia< MeshType >::Fbbb [private] |
double vcg::tri::Inertia< MeshType >::Fbbc [private] |
double vcg::tri::Inertia< MeshType >::Fc [private] |
double vcg::tri::Inertia< MeshType >::Fcc [private] |
double vcg::tri::Inertia< MeshType >::Fcca [private] |
double vcg::tri::Inertia< MeshType >::Fccc [private] |
double vcg::tri::Inertia< MeshType >::P1 [private] |
double vcg::tri::Inertia< MeshType >::Pa [private] |
double vcg::tri::Inertia< MeshType >::Paa [private] |
double vcg::tri::Inertia< MeshType >::Paaa [private] |
double vcg::tri::Inertia< MeshType >::Paab [private] |
double vcg::tri::Inertia< MeshType >::Pab [private] |
double vcg::tri::Inertia< MeshType >::Pabb [private] |
double vcg::tri::Inertia< MeshType >::Pb [private] |
double vcg::tri::Inertia< MeshType >::Pbb [private] |
double vcg::tri::Inertia< MeshType >::Pbbb [private] |
double vcg::tri::Inertia< MeshType >::T0 [private] |
double vcg::tri::Inertia< MeshType >::T1[3] [private] |
double vcg::tri::Inertia< MeshType >::T2[3] [private] |
double vcg::tri::Inertia< MeshType >::TP[3] [private] |