A 3x3 inertia matrix.
More...
#include <InertiaMatrix.hpp>
|
typedef Eigen::Matrix< T, 3, 3 > | Base |
| The type of the internal Eigen matrix implementation.
|
|
|
| InertiaMatrix (T r11, T r12, T r13, T r21, T r22, T r23, T r31, T r32, T r33) |
| Constructs an initialized 3x3 rotation matrix. More...
|
|
| InertiaMatrix (const rw::math::Vector3D< T > &i, const rw::math::Vector3D< T > &j, const rw::math::Vector3D< T > &k) |
| Constructs an initialized 3x3 rotation matrix \( \robabx{a}{b}{\mathbf{R}} = \left[ \begin{array}{ccc} \robabx{a}{b}{\mathbf{i}} & \robabx{a}{b}{\mathbf{j}} & \robabx{a}{b}{\mathbf{k}} \end{array} \right] \). More...
|
|
| InertiaMatrix (T i=0.0, T j=0.0, T k=0.0) |
| constructor - where only the diagonal is set More...
|
|
| InertiaMatrix (const Base &r) |
| Construct an internal matrix from a Eigen::MatrixBase It is the responsibility of the user that 3x3 matrix is indeed an inertia matrix.
|
|
T & | operator() (size_t row, size_t column) |
| Returns reference to matrix element. More...
|
|
const T & | operator() (size_t row, size_t column) const |
| Returns reference to matrix element. More...
|
|
const Base & | e () const |
| Returns reference to the internal 3x3 matrix.
|
|
Base & | e () |
| Returns reference to the internal 3x3 matrix.
|
|
InertiaMatrix | operator* (const rw::math::Rotation3D< T > &bRc) const |
| Calculates \( \robabx{a}{c}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{R}} \). More...
|
|
InertiaMatrix | operator+ (const InertiaMatrix &I2) const |
| Calculates the addition between the two InertiaMatrices.
|
|
rw::math::Vector3D< T > | operator* (const rw::math::Vector3D< T > &bVc) const |
| Calculates \( \robabx{a}{c}{\mathbf{v}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{v}} \). More...
|
|
bool | operator== (const InertiaMatrix &rhs) const |
| Comparison operator. More...
|
|
bool | operator!= (const InertiaMatrix &rhs) const |
| Comparison operator. More...
|
|
rw::math::Vector3D< T > | diag () const |
| get The diagonal of the Matrix More...
|
|
template<class T = double>
class rw::math::InertiaMatrix< T >
A 3x3 inertia matrix.
◆ InertiaMatrix() [1/3]
InertiaMatrix |
( |
T |
r11, |
|
|
T |
r12, |
|
|
T |
r13, |
|
|
T |
r21, |
|
|
T |
r22, |
|
|
T |
r23, |
|
|
T |
r31, |
|
|
T |
r32, |
|
|
T |
r33 |
|
) |
| |
|
inline |
Constructs an initialized 3x3 rotation matrix.
- Parameters
-
r11 | \( r_{11} \) |
r12 | \( r_{12} \) |
r13 | \( r_{13} \) |
r21 | \( r_{21} \) |
r22 | \( r_{22} \) |
r23 | \( r_{23} \) |
r31 | \( r_{31} \) |
r32 | \( r_{32} \) |
r33 | \( r_{33} \) |
\( \mathbf{R} = \left[ \begin{array}{ccc} r_{11} & r_{12} & r_{13} \\ r_{21} & r_{22} & r_{23} \\ r_{31} & r_{32} & r_{33} \end{array} \right] \)
◆ InertiaMatrix() [2/3]
Constructs an initialized 3x3 rotation matrix \( \robabx{a}{b}{\mathbf{R}} = \left[ \begin{array}{ccc} \robabx{a}{b}{\mathbf{i}} & \robabx{a}{b}{\mathbf{j}} & \robabx{a}{b}{\mathbf{k}} \end{array} \right] \).
- Parameters
-
i | \( \robabx{a}{b}{\mathbf{i}} \) |
j | \( \robabx{a}{b}{\mathbf{j}} \) |
k | \( \robabx{a}{b}{\mathbf{k}} \) |
◆ InertiaMatrix() [3/3]
constructor - where only the diagonal is set
- Parameters
-
i | [in] m(0,0) |
j | [in] m(1,1) |
k | [in] m(2,2) |
◆ diag()
◆ makeCuboidInertia()
static InertiaMatrix<T> makeCuboidInertia |
( |
T |
mass, |
|
|
T |
x, |
|
|
T |
y, |
|
|
T |
z |
|
) |
| |
|
inlinestatic |
calculates the inertia of a cuboid where the reference frame is in the center of the cuboid with
- Parameters
-
- Returns
◆ makeHollowSphereInertia()
static InertiaMatrix<T> makeHollowSphereInertia |
( |
T |
mass, |
|
|
T |
radi |
|
) |
| |
|
inlinestatic |
Make inertia matrix for a hollow sphere.
- Parameters
-
mass | [in] mass of hollow sphere. |
radi | [in] radius of sphere. |
- Returns
- the inertia matrix.
◆ makeSolidSphereInertia()
static InertiaMatrix<T> makeSolidSphereInertia |
( |
T |
mass, |
|
|
T |
radi |
|
) |
| |
|
inlinestatic |
Make inertia matrix for a solid sphere.
- Parameters
-
mass | [in] mass of solid sphere. |
radi | [in] radius of sphere. |
- Returns
- the inertia matrix.
◆ operator!=()
Comparison operator.
The comparison operator makes a element wise comparison. Returns true if any of the elements are different.
- Parameters
-
- Returns
- True if not equal.
◆ operator()() [1/2]
T& operator() |
( |
size_t |
row, |
|
|
size_t |
column |
|
) |
| |
|
inline |
Returns reference to matrix element.
- Parameters
-
row | [in] row |
column | [in] column |
- Returns
- reference to the element
◆ operator()() [2/2]
const T& operator() |
( |
size_t |
row, |
|
|
size_t |
column |
|
) |
| const |
|
inline |
Returns reference to matrix element.
- Parameters
-
row | [in] row |
column | [in] column |
- Returns
- reference to the element
◆ operator*() [1/2]
Calculates \( \robabx{a}{c}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{R}} \).
- Parameters
-
bRc | [in] \( \robabx{b}{c}{\mathbf{R}} \) |
- Returns
- \( \robabx{a}{c}{\mathbf{R}} \)
◆ operator*() [2/2]
Calculates \( \robabx{a}{c}{\mathbf{v}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{v}} \).
- Parameters
-
bVc | [in] \( \robabx{b}{c}{\mathbf{v}} \) |
- Returns
- \( \robabx{a}{c}{\mathbf{v}} \)
◆ operator==()
Comparison operator.
The comparison operator makes a element wise comparison. Returns true only if all elements are equal.
- Parameters
-
- Returns
- True if equal.
◆ operator*
Calculates \( \robabx{a}{c}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{R}} \).
- Parameters
-
aRb | [in] \( \robabx{a}{b}{\mathbf{R}} \) |
bRc | [in] \( \robabx{b}{c}{\mathbf{R}} \) |
- Returns
- \( \robabx{a}{c}{\mathbf{R}} \)
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const InertiaMatrix< T > & |
r |
|
) |
| |
|
friend |
Writes rotation matrix to stream.
- Parameters
-
os | [in/out] output stream to use |
r | [in] rotation matrix to print |
- Returns
- the updated output stream
◆ read() [1/2]
Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.
- Parameters
-
sobject | [out] the object in which the data should be streamed into |
iarchive | [in] the InputArchive from which to read data. |
id | [in] The id of the serialized sobject. |
- Note
- the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.
◆ read() [2/2]
Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.
- Parameters
-
sobject | [out] the object in which the data should be streamed into |
iarchive | [in] the InputArchive from which to read data. |
id | [in] The id of the serialized sobject. |
- Note
- the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.
◆ write() [1/2]
Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.
- Parameters
-
sobject | [in] the object from which the data should be streamed. |
oarchive | [out] the OutputArchive in which data should be written. |
id | [in] The id of the serialized sobject. |
- Note
- the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.
◆ write() [2/2]
Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.
- Parameters
-
sobject | [in] the object from which the data should be streamed. |
oarchive | [out] the OutputArchive in which data should be written. |
id | [in] The id of the serialized sobject. |
- Note
- the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.
The documentation for this class was generated from the following files: