A class for inertial information about a rigid body consisting of the scalar mass and a 3x3 symmetric moment of inertia matrix stored as two Vector3's. More...
#include <ignition/math/MassMatrix3.hh>
Public Member Functions | |
MassMatrix3 () | |
Default Constructor. More... | |
MassMatrix3 (const T &_mass, const Vector3< T > &_ixxyyzz, const Vector3< T > &_ixyxzyz) | |
Constructor. More... | |
MassMatrix3 (const MassMatrix3< T > &_m) | |
Copy constructor. More... | |
virtual | ~MassMatrix3 () |
Destructor. More... | |
Vector3< T > | DiagonalMoments () const |
Get the diagonal moments of inertia (Ixx, Iyy, Izz). More... | |
bool | DiagonalMoments (const Vector3< T > &_ixxyyzz) |
Set the diagonal moments of inertia (Ixx, Iyy, Izz). More... | |
bool | InertiaMatrix (const T &_ixx, const T &_iyy, const T &_izz, const T &_ixy, const T &_ixz, const T &_iyz) |
Set the moment of inertia matrix. More... | |
bool | IsPositive () const |
Verify that inertia values are positive definite. More... | |
bool | IsValid () const |
Verify that inertia values are positive definite and satisfy the triangle inequality. More... | |
T | IXX () const |
Get IXX. More... | |
bool | IXX (const T &_v) |
Set IXX. More... | |
T | IXY () const |
Get IXY. More... | |
bool | IXY (const T &_v) |
Set IXY. More... | |
T | IXZ () const |
Get IXZ. More... | |
bool | IXZ (const T &_v) |
Set IXZ. More... | |
T | IYY () const |
Get IYY. More... | |
bool | IYY (const T &_v) |
Set IYY. More... | |
T | IYZ () const |
Get IYZ. More... | |
bool | IYZ (const T &_v) |
Set IYZ. More... | |
T | IZZ () const |
Get IZZ. More... | |
bool | IZZ (const T &_v) |
Set IZZ. More... | |
bool | Mass (const T &_m) |
Set the mass. More... | |
T | Mass () const |
Get the mass. More... | |
Matrix3< T > | MOI () const |
returns Moments of Inertia as a Matrix3 More... | |
bool | MOI (const Matrix3< T > &_moi) |
Sets Moments of Inertia (MOI) from a Matrix3. More... | |
Vector3< T > | OffDiagonalMoments () const |
Get the off-diagonal moments of inertia (Ixy, Ixz, Iyz). More... | |
bool | OffDiagonalMoments (const Vector3< T > &_ixyxzyz) |
Set the off-diagonal moments of inertia (Ixy, Ixz, Iyz). More... | |
bool | operator!= (const MassMatrix3< T > &_m) const |
Inequality test operator. More... | |
MassMatrix3 & | operator= (const MassMatrix3< T > &_massMatrix) |
Equal operator. More... | |
bool | operator== (const MassMatrix3< T > &_m) const |
Equality comparison operator. More... | |
Vector3< T > | PrincipalMoments (const T _tol=1e-6) const |
Compute principal moments of inertia, which are the eigenvalues of the moment of inertia matrix. More... | |
Static Public Member Functions | |
static bool | ValidMoments (const Vector3< T > &_moments) |
Verify that principal moments are positive and satisfy the triangle inequality. More... | |
A class for inertial information about a rigid body consisting of the scalar mass and a 3x3 symmetric moment of inertia matrix stored as two Vector3's.
|
inline |
Default Constructor.
|
inline |
Constructor.
[in] | _mass | Mass value in kg if using metric. |
[in] | _Ixxyyzz | Diagonal moments of inertia. |
[in] | _Ixyxzyz | Off-diagonal moments of inertia |
|
inline |
Copy constructor.
[in] | _massMatrix | MassMatrix3 element to copy |
|
inlinevirtual |
Destructor.
|
inline |
Get the diagonal moments of inertia (Ixx, Iyy, Izz).
Referenced by ignition::math::MassMatrix3< T >::operator=(), and ignition::math::MassMatrix3< T >::operator==().
|
inline |
Set the diagonal moments of inertia (Ixx, Iyy, Izz).
[in] | _ixxyyzz | diagonal moments of inertia |
References ignition::math::MassMatrix3< T >::IsValid().
|
inline |
Set the moment of inertia matrix.
[in] | _ixx | X second moment of inertia (MOI) about x axis. |
[in] | _iyy | Y second moment of inertia about y axis. |
[in] | _izz | Z second moment of inertia about z axis. |
[in] | _ixy | XY inertia. |
[in] | _ixz | XZ inertia. |
[in] | _iyz | YZ inertia. |
References ignition::math::MassMatrix3< T >::IsValid().
|
inline |
Verify that inertia values are positive definite.
References ignition::math::MassMatrix3< T >::IXX(), ignition::math::MassMatrix3< T >::IXY(), ignition::math::MassMatrix3< T >::IYY(), and ignition::math::MassMatrix3< T >::MOI().
Referenced by ignition::math::MassMatrix3< T >::IsValid().
|
inline |
Verify that inertia values are positive definite and satisfy the triangle inequality.
References ignition::math::MassMatrix3< T >::IsPositive(), ignition::math::MassMatrix3< T >::PrincipalMoments(), and ignition::math::MassMatrix3< T >::ValidMoments().
Referenced by ignition::math::MassMatrix3< T >::DiagonalMoments(), ignition::math::MassMatrix3< T >::InertiaMatrix(), ignition::math::MassMatrix3< T >::IXX(), ignition::math::MassMatrix3< T >::IXY(), ignition::math::MassMatrix3< T >::IXZ(), ignition::math::MassMatrix3< T >::IYY(), ignition::math::MassMatrix3< T >::IYZ(), ignition::math::MassMatrix3< T >::IZZ(), ignition::math::MassMatrix3< T >::Mass(), ignition::math::MassMatrix3< T >::MOI(), and ignition::math::MassMatrix3< T >::OffDiagonalMoments().
|
inline |
|
inline |
Set IXX.
[in] | _v | IXX value |
References ignition::math::MassMatrix3< T >::IsValid().
|
inline |
|
inline |
Set IXY.
[in] | _v | IXY value |
References ignition::math::MassMatrix3< T >::IsValid().
|
inline |
Get IXZ.
|
inline |
Set IXZ.
[in] | _v | IXZ value |
References ignition::math::MassMatrix3< T >::IsValid().
|
inline |
|
inline |
Set IYY.
[in] | _v | IYY value |
References ignition::math::MassMatrix3< T >::IsValid().
|
inline |
Get IYZ.
|
inline |
Set IYZ.
[in] | _v | IYZ value |
References ignition::math::MassMatrix3< T >::IsValid().
|
inline |
Get IZZ.
|
inline |
Set IZZ.
[in] | _v | IZZ value |
References ignition::math::MassMatrix3< T >::IsValid().
|
inline |
Set the mass.
[in] | _m | New mass value. |
References ignition::math::MassMatrix3< T >::IsValid().
Referenced by ignition::math::MassMatrix3< T >::operator=(), and ignition::math::MassMatrix3< T >::operator==().
|
inline |
Get the mass.
|
inline |
returns Moments of Inertia as a Matrix3
Referenced by ignition::math::MassMatrix3< T >::IsPositive().
|
inline |
Sets Moments of Inertia (MOI) from a Matrix3.
Symmetric component of input matrix is used by averaging off-axis terms.
[in] | Moments | of Inertia as a Matrix3 |
References ignition::math::MassMatrix3< T >::IsValid().
|
inline |
Get the off-diagonal moments of inertia (Ixy, Ixz, Iyz).
Referenced by ignition::math::MassMatrix3< T >::operator=(), and ignition::math::MassMatrix3< T >::operator==().
|
inline |
Set the off-diagonal moments of inertia (Ixy, Ixz, Iyz).
[in] | _ixyxzyz | off-diagonal moments of inertia |
References ignition::math::MassMatrix3< T >::IsValid().
|
inline |
Inequality test operator.
[in] | _m | MassMatrix3<T> to test |
|
inline |
Equal operator.
[in] | _massMatrix | MassMatrix3 to copy. |
References ignition::math::MassMatrix3< T >::DiagonalMoments(), ignition::math::MassMatrix3< T >::Mass(), and ignition::math::MassMatrix3< T >::OffDiagonalMoments().
|
inline |
Equality comparison operator.
[in] | _m | MassMatrix3 to copy. |
References ignition::math::MassMatrix3< T >::DiagonalMoments(), ignition::math::MassMatrix3< T >::Mass(), and ignition::math::MassMatrix3< T >::OffDiagonalMoments().
|
inline |
Compute principal moments of inertia, which are the eigenvalues of the moment of inertia matrix.
[in] | _tol | Relative tolerance. |
References ignition::math::sort3(), and ignition::math::Vector3< T >::Sum().
Referenced by ignition::math::MassMatrix3< T >::IsValid().
|
inlinestatic |
Verify that principal moments are positive and satisfy the triangle inequality.
[in] | _moments | Principal moments of inertia. |
Referenced by ignition::math::MassMatrix3< T >::IsValid().