24#include "AstMath/Quaternion.hpp"
25#include "AstMath/Matrix.hpp"
26#include "AstMath/Vector.hpp"
27#include "AstMath/AngleAxis.hpp"
28#include "AstMath/AttitudeConvert.hpp"
49 return *
reinterpret_cast<Rotation*
>(&mat);
55 return *
reinterpret_cast<const Rotation*
>(&mat);
82 Rotation(
double angle,
const Vector3d& axis);
92 Matrix3d& getMatrix() {
return matrix_; }
108 Vector3d getAxis()
const;
112 double getAngle()
const;
118 void getAngleAxis(
double& angle, Vector3d& axis)
const;
124 void setAngleAxis(
double angle,
const Vector3d& axis);
161 void getInverse(
Rotation& inversed)
const;
170 void transformVector(
const Vector3d& vector, Vector3d& vectorOut)
const;
177 void transformVectorInv(
const Vector3d& vector, Vector3d& vectorOut)
const;
182 Vector3d transformVector(
const Vector3d& vector)
const;
188 Vector3d transformVectorInv(
const Vector3d& vector)
const;
202A_ALWAYS_INLINE Rotation::Rotation(
const Matrix3d& mat)
213 : matrix_(aa.toRotationMatrix())
219 return Rotation(Matrix3d::Identity());
271 matrix_ = next.matrix_ * matrix_;
277 return Rotation(next.matrix_ * matrix_);
292 inversed.matrix_ = this->matrix_.transpose();
304 vectorOut = this->matrix_ * vector;
309 vectorOut = vector * this->matrix_;
const Vector3d & axis() const
获取旋转轴
定义 AngleAxis.hpp:53
double angle() const
获取旋转角度(弧度)
定义 AngleAxis.hpp:48
Matrix3d toRotationMatrix() const
轴角转旋转矩阵
定义 AngleAxis.hpp:74
double getAngle() const
获取旋转角度(弧度)
定义 Rotation.hpp:239
Vector3d getAxis() const
获取旋转轴
定义 Rotation.hpp:232
void transformVector(const Vector3d &vector, Vector3d &vectorOut) const
变换向量
定义 Rotation.hpp:302
void transformVectorInv(const Vector3d &vector, Vector3d &vectorOut) const
变换向量(逆变换)
定义 Rotation.hpp:307
void getAngleAxis(double &angle, Vector3d &axis) const
获取旋转轴和角度(弧度)
定义 Rotation.hpp:246
void getInverse(Rotation &inversed) const
获取逆旋转
定义 Rotation.hpp:290
static Rotation FromMatrix(const Matrix3d &mat)
从矩阵转换为坐标系旋转对象
定义 Rotation.hpp:59
Rotation & compose(const Rotation &next)
组合下一个旋转
定义 Rotation.hpp:269
static const Rotation & CastFrom(const Matrix3d &mat)
从矩阵转换为坐标系旋转对象(常量版本)
定义 Rotation.hpp:53
Rotation()=default
坐标系旋转类默认构造函数
static Rotation Identity()
单位旋转
定义 Rotation.hpp:217
void setQuaternion(const Quaternion &quat)
设置四元数
定义 Rotation.hpp:227
const Matrix3d & getMatrix() const
获取旋转矩阵
定义 Rotation.hpp:91
Quaternion getQuaternion() const
获取四元数
定义 Rotation.hpp:222
Rotation composed(const Rotation &next) const
组合下一个旋转
定义 Rotation.hpp:275
void setMatrix(const Matrix3d &mat)
设置旋转矩阵
定义 Rotation.hpp:96
Rotation operator*(const Rotation &next) const
组合下一个旋转
定义 Rotation.hpp:280
void setAngleAxis(double angle, const Vector3d &axis)
设置轴角
定义 Rotation.hpp:254
Rotation(const Rotation &other)=default
复制构造函数
static Rotation & CastFrom(Matrix3d &mat)
从矩阵转换为坐标系旋转对象
定义 Rotation.hpp:47
Rotation inverse() const
获取逆旋转
定义 Rotation.hpp:295
Rotation & operator*=(const Rotation &next)
组合下一个旋转
定义 Rotation.hpp:285
void aQuatToMatrix(const Quaternion &quat, Matrix3d &m)
四元数转矩阵
定义 AttitudeConvert.cpp:90
void aMatrixToAngleAxis(const Matrix3d &mtx, AngleAxis &aa)
矩阵转轴角
定义 AttitudeConvert.cpp:743
void aMatrixToQuat(const Matrix3d &mtx, Quaternion &quat)
矩阵转四元数
定义 AttitudeConvert.cpp:115