|
| | EulerAngle () |
| | 默认构造函数,初始化所有角度为零。 Default constructor initializing all angles to zero.
|
| |
| | EulerAngle (Scalar roll, Scalar pitch, Scalar yaw) |
| | 使用指定角度构造欧拉角对象。 Constructs an Euler angle object with given angles.
|
| |
| | EulerAngle (const Eigen::Matrix< Scalar, 3, 1 > &p) |
| | 通过 Eigen 3D 向量构造欧拉角对象。 Constructs an Euler angle object using an Eigen 3D vector.
|
| |
| | EulerAngle (const EulerAngle &p) |
| | 拷贝构造函数 / Copy constructor.
|
| |
| Scalar & | Roll () noexcept |
| |
| const Scalar & | Roll () const noexcept |
| |
| Scalar & | Pitch () noexcept |
| |
| const Scalar & | Pitch () const noexcept |
| |
| Scalar & | Yaw () noexcept |
| |
| const Scalar & | Yaw () const noexcept |
| |
| 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> |
| | EulerAngle (const T(&data)[3]) |
| | 通过 3 元素数组构造欧拉角对象。 Constructs an Euler angle object using a 3-element array.
|
| |
| | operator Eigen::Matrix< Scalar, 3, 1 > () const |
| | 转换为 Eigen 3D 向量 / Converts to an Eigen 3D vector.
|
| |
| Scalar | operator() (int i) const |
| | 获取欧拉角的某个分量 / Retrieves a specific Euler angle component.
|
| |
| EulerAngle & | operator= (const Eigen::Matrix< Scalar, 3, 1 > &p) |
| | 赋值运算符,从 Eigen 3D 向量赋值。 Assignment operator from an Eigen 3D vector.
|
| |
| EulerAngle & | operator= (const EulerAngle &p) |
| | 赋值运算符,从另一个 EulerAngle 赋值。 Assignment operator from another EulerAngle.
|
| |
| Eigen::Matrix< Scalar, 3, 3 > | ToRotationMatrix () const |
| | 转换为旋转矩阵,默认使用 ZYX 顺序。 Converts to a rotation matrix using the ZYX order by default.
|
| |
| Eigen::Matrix< Scalar, 3, 3 > | ToRotationMatrixZYX () const |
| |
| Eigen::Matrix< Scalar, 3, 3 > | ToRotationMatrixZXY () const |
| |
| Eigen::Matrix< Scalar, 3, 3 > | ToRotationMatrixYXZ () const |
| |
| Eigen::Matrix< Scalar, 3, 3 > | ToRotationMatrixYZX () const |
| |
| Eigen::Matrix< Scalar, 3, 3 > | ToRotationMatrixXYZ () const |
| |
| Eigen::Matrix< Scalar, 3, 3 > | ToRotationMatrixXZY () const |
| |
| Eigen::Quaternion< Scalar > | ToQuaternion () const |
| | 转换为四元数,默认使用 ZYX 顺序。 Converts to a quaternion using the ZYX order by default.
|
| |
| Eigen::Quaternion< Scalar > | ToQuaternionXYZ () const |
| | 按 XYZ 顺序转换为四元数。 Converts to a quaternion using the XYZ order.
|
| |
| Eigen::Quaternion< Scalar > | ToQuaternionXZY () const |
| |
| Eigen::Quaternion< Scalar > | ToQuaternionYXZ () const |
| |
| Eigen::Quaternion< Scalar > | ToQuaternionYZX () const |
| |
| Eigen::Quaternion< Scalar > | ToQuaternionZXY () const |
| |
| Eigen::Quaternion< Scalar > | ToQuaternionZYX () const |
| |
template<typename Scalar>
class LibXR::EulerAngle< Scalar >
表示欧拉角的类,用于描述3D旋转。 Class representing Euler angles for 3D rotation.
三个分量依次为 roll(绕 X 轴)、pitch(绕 Y 轴)和 yaw(绕 Z 轴),单位为弧度。 ToRotationMatrixABC() 返回 R_A·R_B·R_C,其中 R_X、R_Y、R_Z 是绕对应坐标轴分别转过 roll、pitch、yaw 的基本旋转矩阵,例如 ToRotationMatrixXYZ() 等于 Rx(roll)·Ry(pitch)·Rz(yaw)。作用于列向量时,这相当于先绕 A 轴、再绕转动后的 B 轴、 最后绕转动后的 C 轴的内旋,也相当于依次绕固定的 C、B、A 轴的外旋。默认顺序 ZYX 即 先 yaw、再 pitch、最后 roll 的内旋。ToQuaternionABC() 表示同一个旋转; RotationMatrix 和 Quaternion 的 ToEulerAngleABC() 按同一约定求回三个角。
The three components are roll (about X), pitch (about Y) and yaw (about Z), in radians. ToRotationMatrixABC() returns R_A·R_B·R_C, where R_X, R_Y and R_Z are the elementary rotations by roll, pitch and yaw about the corresponding axes; for example ToRotationMatrixXYZ() equals Rx(roll)·Ry(pitch)·Rz(yaw). Applied to column vectors, this is an intrinsic rotation about A, then the rotated B, then the rotated C, which is the same as an extrinsic rotation about the fixed axes C, B and A in that order. The default order ZYX is the intrinsic yaw, pitch, roll sequence. ToQuaternionABC() represents the same rotation, and ToEulerAngleABC() of RotationMatrix and Quaternion recovers the angles under the same convention.
- Template Parameters
-
| Scalar | 数据类型,如 float 或 double / Data type, such as float or double. |
Definition at line 371 of file transform.hpp.
template<typename Scalar >
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>
通过 3 元素数组构造欧拉角对象。 Constructs an Euler angle object using a 3-element array.
- Template Parameters
-
| T | 数据类型,支持 Scalar、float 或 double。 Data type, supporting Scalar, float, or double. |
- Parameters
-
| data | 存储 (roll, pitch, yaw) 的数组 / Array storing (roll, pitch, yaw). |
Definition at line 420 of file transform.hpp.
420 :
data_{data[0], data[1], data[2]}
421 {
422 }