gz/math/MassMatrix3.hh
Go to the documentation of this file.
The Angle class is used to simplify and clarify the use of radians and degrees measurements....
Definition: gz/math/Angle.hh:62
void Normalize()
Normalize the angle in the range -Pi to Pi. This modifies the value contained in this Angle instance.
A class for inertial information about a rigid body consisting of the scalar mass and a 3x3 symmetric...
Definition: gz/math/MassMatrix3.hh:46
virtual ~MassMatrix3()
Destructor.
Definition: gz/math/MassMatrix3.hh:70
bool IsNearPositive(const T _tolerance=IGN_MASSMATRIX3_DEFAULT_TOLERANCE< T >) const
Verify that inertia values are positive semidefinite.
Definition: gz/math/MassMatrix3.hh:475
MassMatrix3(const MassMatrix3< T > &_m)
Copy constructor.
Definition: gz/math/MassMatrix3.hh:64
bool SetIxz(const T &_v)
Set IXZ.
Definition: gz/math/MassMatrix3.hh:357
bool SetFromBox(const Vector3< T > &_size, const Quaternion< T > &_rot=Quaternion< T >::Identity)
Set inertial properties based on equivalent box using the current mass value.
Definition: gz/math/MassMatrix3.hh:1086
Quaternion< T > PrincipalAxesOffset(const T _tol=1e-6) const
Compute rotational offset of principal axes.
Definition: gz/math/MassMatrix3.hh:712
bool SetFromCylinderZ(const T _mass, const T _length, const T _radius, const Quaternion< T > &_rot=Quaternion< T >::Identity)
Set inertial properties based on mass and equivalent cylinder aligned with Z axis.
Definition: gz/math/MassMatrix3.hh:1141
bool SetOffDiagonalMoments(const Vector3< T > &_ixyxzyz)
Set the off-diagonal moments of inertia (Ixy, Ixz, Iyz).
Definition: gz/math/MassMatrix3.hh:177
bool operator!=(const MassMatrix3< T > &_m) const
Inequality test operator.
Definition: gz/math/MassMatrix3.hh:451
bool operator==(const MassMatrix3< T > &_m) const
Equality comparison operator.
Definition: gz/math/MassMatrix3.hh:441
MassMatrix3 & operator=(const MassMatrix3< T > &_massMatrix)
Equal operator.
Definition: gz/math/MassMatrix3.hh:428
T Epsilon(const T _tolerance=IGN_MASSMATRIX3_DEFAULT_TOLERANCE< T >) const
Get an epsilon value that represents the amount of acceptable error in a MassMatrix3....
Definition: gz/math/MassMatrix3.hh:529
bool SetFromSphere(const T _radius)
Set inertial properties based on equivalent sphere using the current mass value.
Definition: gz/math/MassMatrix3.hh:1222
bool SetIzz(const T &_v)
Set IZZ.
Definition: gz/math/MassMatrix3.hh:321
bool SetDiagonalMoments(const Vector3< T > &_ixxyyzz)
Set the diagonal moments of inertia (Ixx, Iyy, Izz).
Definition: gz/math/MassMatrix3.hh:158
Vector3< T > DiagonalMoments() const
Get the diagonal moments of inertia (Ixx, Iyy, Izz).
Definition: gz/math/MassMatrix3.hh:133
MassMatrix3(const T &_mass, const Vector3< T > &_ixxyyzz, const Vector3< T > &_ixyxzyz)
Constructor.
Definition: gz/math/MassMatrix3.hh:56
bool SetFromCylinderZ(const T _length, const T _radius, const Quaternion< T > &_rot)
Set inertial properties based on equivalent cylinder aligned with Z axis using the current mass value...
Definition: gz/math/MassMatrix3.hh:1163
bool SetFromCylinderZ(const Material &_mat, const T _length, const T _radius, const Quaternion< T > &_rot=Quaternion< T >::Identity)
Set inertial properties based on a Material and equivalent cylinder aligned with Z axis.
Definition: gz/math/MassMatrix3.hh:1117
MassMatrix3()
Default Constructor, which inializes the mass and moments to zero.
Definition: gz/math/MassMatrix3.hh:49
bool SetIyz(const T &_v)
Set IYZ.
Definition: gz/math/MassMatrix3.hh:375
bool Mass(const T &_m)
Set the mass.
Definition: gz/math/MassMatrix3.hh:76
bool SetIyy(const T &_v)
Set IYY.
Definition: gz/math/MassMatrix3.hh:303
bool SetFromSphere(const Material &_mat, const T _radius)
Set inertial properties based on a material and equivalent sphere.
Definition: gz/math/MassMatrix3.hh:1191
bool SetMoi(const Matrix3< T > &_moi)
Sets Moments of Inertia (MOI) from a Matrix3. Symmetric component of input matrix is used by averagin...
Definition: gz/math/MassMatrix3.hh:415
bool SetFromSphere(const T _mass, const T _radius)
Set inertial properties based on mass and equivalent sphere.
Definition: gz/math/MassMatrix3.hh:1207
static T Epsilon(const Vector3< T > &_moments, const T _tolerance=IGN_MASSMATRIX3_DEFAULT_TOLERANCE< T >)
Get an epsilon value that represents the amount of acceptable error in a MassMatrix3....
Definition: gz/math/MassMatrix3.hh:556
bool SetIxx(const T &_v)
Set IXX.
Definition: gz/math/MassMatrix3.hh:285
bool IsPositive(const T _tolerance=IGN_MASSMATRIX3_DEFAULT_TOLERANCE< T >) const
Verify that inertia values are positive definite.
Definition: gz/math/MassMatrix3.hh:508
Vector3< T > OffDiagonalMoments() const
Get the off-diagonal moments of inertia (Ixy, Ixz, Iyz).
Definition: gz/math/MassMatrix3.hh:140
Matrix3< T > Moi() const
returns Moments of Inertia as a Matrix3
Definition: gz/math/MassMatrix3.hh:391
bool SetFromBox(const Material &_mat, const Vector3< T > &_size, const Quaternion< T > &_rot=Quaternion< T >::Identity)
Set inertial properties based on a Material and equivalent box.
Definition: gz/math/MassMatrix3.hh:1054
bool IsValid(const T _tolerance=IGN_MASSMATRIX3_DEFAULT_TOLERANCE< T >) const
Verify that inertia values are positive semi-definite and satisfy the triangle inequality.
Definition: gz/math/MassMatrix3.hh:595
bool SetInertiaMatrix(const T &_ixx, const T &_iyy, const T &_izz, const T &_ixy, const T &_ixz, const T &_iyz)
Set the moment of inertia matrix.
Definition: gz/math/MassMatrix3.hh:122
Vector3< T > PrincipalMoments(const T _tol=1e-6) const
Compute principal moments of inertia, which are the eigenvalues of the moment of inertia matrix.
Definition: gz/math/MassMatrix3.hh:646
bool SetMass(const T &_m)
Set the mass.
Definition: gz/math/MassMatrix3.hh:84
static bool ValidMoments(const Vector3< T > &_moments, const T _tolerance=IGN_MASSMATRIX3_DEFAULT_TOLERANCE< T >)
Verify that principal moments are positive and satisfy the triangle inequality.
Definition: gz/math/MassMatrix3.hh:622
bool SetIxy(const T &_v)
Set IXY.
Definition: gz/math/MassMatrix3.hh:339
bool SetFromBox(const T _mass, const Vector3< T > &_size, const Quaternion< T > &_rot=Quaternion< T >::Identity)
Set inertial properties based on mass and equivalent box.
Definition: gz/math/MassMatrix3.hh:1067
bool EquivalentBox(Vector3< T > &_size, Quaternion< T > &_rot, const T _tol=1e-6) const
Get dimensions and rotation offset of uniform box with equivalent mass and moment of inertia....
Definition: gz/math/MassMatrix3.hh:1010
Contains information about a single material.
Definition: gz/math/Material.hh:66
double Density() const
Get the density value of the material in kg/m^3.
Matrix3< T > Transposed() const
Return the transpose of this matrix.
Definition: gz/math/Matrix3.hh:480
Quaternion< T > Inverse() const
Get the inverse of this quaternion.
Definition: gz/math/Quaternion.hh:132
void Set(T _x, T _y)
Set the contents of the vector.
Definition: gz/math/Vector2.hh:149
T SquaredLength() const
Returns the square of the length (magnitude) of the vector.
Definition: gz/math/Vector2.hh:100
The Vector3 class represents the generic vector containing 3 elements. Since it's commonly used to ke...
Definition: gz/math/Vector3.hh:42
void Min(const Vector3< T > &_v)
Set this vector's components to the minimum of itself and the passed in vector.
Definition: gz/math/Vector3.hh:294
T Sum() const
Return the sum of the values.
Definition: gz/math/Vector3.hh:94
bool Equal(const Vector3 &_v, const T &_tol) const
Equality test with tolerance.
Definition: gz/math/Vector3.hh:565
T epsilon(T... args)
#define IGN_PI
Define IGN_PI, IGN_PI_2, and IGN_PI_4. This was put here for Windows support.
Definition: gz/math/Helpers.hh:184
void sort3(T &_a, T &_b, T &_c)
Sort three numbers, such that _a <= _b <= _c.
Definition: gz/math/Helpers.hh:612
MassMatrix3< float > MassMatrix3f
Definition: gz/math/MassMatrix3.hh:1276
MassMatrix3< double > MassMatrix3d
Definition: gz/math/MassMatrix3.hh:1275
Definition: gz/math/AdditivelySeparableScalarField3.hh:28
T pow(T... args)