libxr 1.0
Want to be the best embedded framework
|
表示刚体的惯性张量和质量信息的类。Provides a class to represent the inertia tensor and mass of a rigid body. More...
#include <inertia.hpp>
Public Member Functions | |
template<typename T , std::enable_if_t< std::is_same< T, Scalar >::value||std::is_same< T, float >::value||std::is_same< T, double >::value, int > = 0> | |
Inertia (Scalar m, const T(&data)[9]) | |
使用质量和 3x3 惯性张量数组构造惯性对象。Constructs an inertia object using mass and a 3x3 inertia tensor array. | |
template<typename T , std::enable_if_t< std::is_same< T, Scalar >::value||std::is_same< T, float >::value||std::is_same< T, double >::value, int > = 0> | |
Inertia (Scalar m, const T(&data)[3][3]) | |
使用质量和二维 3x3 数组构造惯性对象。Constructs an inertia object using mass and a 3x3 matrix. | |
Inertia () | |
默认构造函数,初始化质量为0,惯性张量为零矩阵。Default constructor initializing mass to 0 and inertia tensor to zero. | |
template<typename T , std::enable_if_t< std::is_same< T, float >::value||std::is_same< T, double >::value, int > = 0> | |
Inertia (Scalar m, const T(&data)[6]) | |
使用质量和 6 维数组(对称惯性矩阵)构造惯性对象。Constructs an inertia object using mass and a 6-element symmetric inertia matrix. | |
Inertia (Scalar m, Scalar xx, Scalar yy, Scalar zz, Scalar xy, Scalar yz, Scalar xz) | |
直接指定质量和惯性张量分量构造惯性对象。Constructs an inertia object with mass and specified inertia tensor elements. | |
Inertia (Scalar m, const Eigen::Matrix< Scalar, 3, 3 > &R) | |
使用 Eigen 3x3 矩阵构造惯性对象。Constructs an inertia object using an Eigen 3x3 matrix. | |
operator Eigen::Matrix< Scalar, 3, 3 > () const | |
转换为 Eigen 3x3 矩阵。Converts to an Eigen 3x3 matrix. | |
Scalar | operator() (int i, int j) const |
获取惯性张量中的特定元素。Retrieves a specific element from the inertia tensor. | |
Eigen::Matrix< Scalar, 3, 3 > | operator+ (const Eigen::Matrix< Scalar, 3, 3 > &R) const |
将惯性张量与另一个 3x3 矩阵相加。Adds the inertia tensor with another 3x3 matrix. | |
Inertia | Translate (const Eigen::Matrix< Scalar, 3, 1 > &p) const |
平移惯性对象。Translates the inertia object. | |
Inertia | Rotate (const Eigen::Matrix< Scalar, 3, 3 > &R) const |
旋转惯性张量。Rotates the inertia tensor. | |
Inertia | Rotate (const RotationMatrix< Scalar > &R) const |
使用 RotationMatrix 旋转惯性张量。Rotates the inertia tensor using a RotationMatrix. | |
Inertia | Rotate (const Eigen::Quaternion< Scalar > &q) const |
使用四元数旋转惯性张量。Rotates the inertia tensor using a quaternion. | |
Inertia | Rotate (const Quaternion< Scalar > &q) const |
使用自定义 Quaternion 旋转惯性张量。Rotates the inertia tensor using a custom Quaternion. | |
Static Public Member Functions | |
static Eigen::Matrix< Scalar, 3, 3 > | Rotate (const Eigen::Matrix< Scalar, 3, 3 > &R, const Eigen::Quaternion< Scalar > &q) |
使用四元数旋转 3x3 矩阵。Rotates a 3x3 matrix using a quaternion. | |
Data Fields | |
Scalar | data [9] |
Scalar | mass |
质量值。Mass value. | |
表示刚体的惯性张量和质量信息的类。Provides a class to represent the inertia tensor and mass of a rigid body.
Scalar | 数据类型,默认为 DefaultScalar。The data type, defaulting to DefaultScalar. |
Definition at line 22 of file inertia.hpp.
|
inlineexplicit |
使用质量和 3x3 惯性张量数组构造惯性对象。Constructs an inertia object using mass and a 3x3 inertia tensor array.
T | 数据类型,支持 Scalar、float 或 double。Data type, supporting Scalar, float, or double. |
m | 质量值。Mass value. |
data | 3x3 惯性张量数组。3x3 inertia tensor array. |
Definition at line 41 of file inertia.hpp.
|
inlineexplicit |
使用质量和二维 3x3 数组构造惯性对象。Constructs an inertia object using mass and a 3x3 matrix.
T | 数据类型,支持 Scalar、float 或 double。Data type, supporting Scalar, float, or double. |
m | 质量值。Mass value. |
data | 3x3 惯性张量矩阵。3x3 inertia tensor matrix. |
Definition at line 64 of file inertia.hpp.
|
inline |
|
inlineexplicit |
使用质量和 6 维数组(对称惯性矩阵)构造惯性对象。Constructs an inertia object using mass and a 6-element symmetric inertia matrix.
T | 数据类型,支持 float 或 double。Data type, supporting float or double. |
m | 质量值。Mass value. |
data | 6 维惯性张量数据。6-element inertia tensor data. |
Definition at line 91 of file inertia.hpp.
|
inline |
直接指定质量和惯性张量分量构造惯性对象。Constructs an inertia object with mass and specified inertia tensor elements.
m | 质量值。Mass value. |
xx,yy,zz | 主惯性矩。Principal moments of inertia. |
xy,yz,xz | 交叉惯性矩。Cross moments of inertia. |
Definition at line 105 of file inertia.hpp.
|
inline |
|
inline |
转换为 Eigen 3x3 矩阵。Converts to an Eigen 3x3 matrix.
Definition at line 122 of file inertia.hpp.
|
inline |
获取惯性张量中的特定元素。Retrieves a specific element from the inertia tensor.
Definition at line 129 of file inertia.hpp.
|
inline |
将惯性张量与另一个 3x3 矩阵相加。Adds the inertia tensor with another 3x3 matrix.
Definition at line 134 of file inertia.hpp.
|
inline |
旋转惯性张量。Rotates the inertia tensor.
R | 旋转矩阵。Rotation matrix. |
Definition at line 160 of file inertia.hpp.
|
inlinestatic |
使用四元数旋转 3x3 矩阵。Rotates a 3x3 matrix using a quaternion.
R | 3x3 矩阵。3x3 matrix. |
q | 四元数。Quaternion. |
Definition at line 194 of file inertia.hpp.
|
inline |
|
inline |
使用自定义 Quaternion 旋转惯性张量。Rotates the inertia tensor using a custom Quaternion.
q | 自定义四元数对象。Custom quaternion object. |
Definition at line 206 of file inertia.hpp.
|
inline |
使用 RotationMatrix 旋转惯性张量。Rotates the inertia tensor using a RotationMatrix.
R | 旋转矩阵对象。Rotation matrix object. |
Definition at line 172 of file inertia.hpp.
|
inline |
平移惯性对象。Translates the inertia object.
p | 平移向量。Translation vector. |
Definition at line 144 of file inertia.hpp.
Scalar LibXR::Inertia< Scalar >::data[9] |
惯性张量数据,3x3 矩阵存储为一维数组。Inertia tensor data stored as a 3x3 matrix in a 1D array.
Definition at line 25 of file inertia.hpp.
Scalar LibXR::Inertia< Scalar >::mass |
质量值。Mass value.
Definition at line 27 of file inertia.hpp.