🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::Rotation类 参考

#include <Rotation.hpp>

+ 类 ast::Rotation 继承关系图:

Public 成员函数

 Rotation ()=default
 
 Rotation (const Rotation &other)=default
 
 Rotation (const Quaternion &quat)
 
 Rotation (const Matrix3d &mat)
 
 Rotation (double angle, const Vector3d &axis)
 
 Rotation (const AngleAxis &aa)
 
const Matrix3dgetMatrix () const
 
Matrix3dgetMatrix ()
 
void setMatrix (const Matrix3d &mat)
 
Quaternion getQuaternion () const
 
void setQuaternion (const Quaternion &quat)
 
Vector3d getAxis () const
 
double getAngle () const
 
void getAngleAxis (double &angle, Vector3d &axis) const
 
void setAngleAxis (double angle, const Vector3d &axis)
 
void getAngleAxis (AngleAxis &aa) const
 
void setAngleAxis (const AngleAxis &aa)
 
Rotationcompose (const Rotation &next)
 
Rotation composed (const Rotation &next) const
 
Rotation operator* (const Rotation &next) const
 
Rotationoperator*= (const Rotation &next)
 
void getInverse (Rotation &inversed) const
 
Rotation inverse () const
 
void transformVector (const Vector3d &vector, Vector3d &vectorOut) const
 
void transformVectorInv (const Vector3d &vector, Vector3d &vectorOut) const
 
Vector3d transformVector (const Vector3d &vector) const
 
Vector3d transformVectorInv (const Vector3d &vector) const
 

静态 Public 成员函数

static Rotation Identity ()
 
static RotationCastFrom (Matrix3d &mat)
 
static const RotationCastFrom (const Matrix3d &mat)
 
static Rotation FromMatrix (const Matrix3d &mat)
 

Protected 属性

Matrix3d matrix_
 

详细描述

坐标系旋转类

表示三维空间内的坐标系旋转 坐标系旋转类当前是基于坐标转换矩阵实现的,未来也可能会切换到四元数进行实现。 但是你不用关心其内部实现细节,只需要关注并使用其公开接口,注意不要依赖其内部实现。

构造及析构函数说明

◆ Rotation() [1/5]

ast::Rotation::Rotation ( const Rotation & other)
default

复制构造函数

参数
other坐标系旋转对象

◆ Rotation() [2/5]

A_ALWAYS_INLINE ast::Rotation::Rotation ( const Quaternion & quat)

构造函数

参数
quat四元数

◆ Rotation() [3/5]

A_ALWAYS_INLINE ast::Rotation::Rotation ( const Matrix3d & mat)

从旋转矩阵构造坐标系旋转对象

参数
mat旋转矩阵

◆ Rotation() [4/5]

A_ALWAYS_INLINE ast::Rotation::Rotation ( double angle,
const Vector3d & axis )

从轴角构造坐标系旋转对象

参数
axis旋转轴
angle旋转角度(弧度)

◆ Rotation() [5/5]

A_ALWAYS_INLINE ast::Rotation::Rotation ( const AngleAxis & aa)

从轴角构造坐标系旋转对象

参数
aa轴角

成员函数说明

◆ compose()

A_ALWAYS_INLINE Rotation & ast::Rotation::compose ( const Rotation & next)

组合下一个旋转

警告
组合旋转是先应用当前旋转,再应用下一个旋转 这个函数会修改当前旋转对象。
参数
next下一个旋转

◆ composed()

A_ALWAYS_INLINE Rotation ast::Rotation::composed ( const Rotation & next) const

组合下一个旋转

警告
组合旋转是先应用当前旋转,再应用下一个旋转。
参数
next下一个旋转
返回
组合旋转

◆ getAngle()

A_ALWAYS_INLINE double ast::Rotation::getAngle ( ) const

获取旋转角度(弧度)

返回
旋转角度(弧度)

◆ getAngleAxis() [1/2]

A_ALWAYS_INLINE void ast::Rotation::getAngleAxis ( AngleAxis & aa) const

获取轴角

参数
aa轴角

◆ getAngleAxis() [2/2]

A_ALWAYS_INLINE void ast::Rotation::getAngleAxis ( double & angle,
Vector3d & axis ) const

获取旋转轴和角度(弧度)

参数
axis旋转轴
angle旋转角度(弧度)

◆ getAxis()

A_ALWAYS_INLINE Vector3d ast::Rotation::getAxis ( ) const

获取旋转轴

返回
旋转轴

◆ getInverse()

A_ALWAYS_INLINE void ast::Rotation::getInverse ( Rotation & inversed) const

获取逆旋转

参数
inversed逆旋转

◆ getMatrix()

const Matrix3d & ast::Rotation::getMatrix ( ) const
inline

获取旋转矩阵

返回
旋转矩阵

◆ getQuaternion()

A_ALWAYS_INLINE Quaternion ast::Rotation::getQuaternion ( ) const

获取四元数

返回
四元数

◆ Identity()

A_ALWAYS_INLINE Rotation ast::Rotation::Identity ( )
static

单位旋转

单位旋转是指不进行任何旋转的旋转

返回
单位旋转

◆ inverse()

A_ALWAYS_INLINE Rotation ast::Rotation::inverse ( ) const

获取逆旋转

返回
逆旋转

◆ operator*()

A_ALWAYS_INLINE Rotation ast::Rotation::operator* ( const Rotation & next) const

组合下一个旋转

警告
组合旋转是先应用当前旋转,再应用下一个旋转。
参数
next下一个旋转
返回
组合旋转

◆ operator*=()

A_ALWAYS_INLINE Rotation & ast::Rotation::operator*= ( const Rotation & next)

组合下一个旋转

警告
组合旋转是先应用当前旋转,再应用下一个旋转。
参数
next下一个旋转
返回
组合旋转

◆ setAngleAxis() [1/2]

A_ALWAYS_INLINE void ast::Rotation::setAngleAxis ( const AngleAxis & aa)

设置轴角

参数
aa轴角

◆ setAngleAxis() [2/2]

A_ALWAYS_INLINE void ast::Rotation::setAngleAxis ( double angle,
const Vector3d & axis )

设置轴角

参数
angle旋转角度(弧度)
axis旋转轴

◆ setMatrix()

void ast::Rotation::setMatrix ( const Matrix3d & mat)
inline

设置旋转矩阵

参数
mat旋转矩阵

◆ setQuaternion()

A_ALWAYS_INLINE void ast::Rotation::setQuaternion ( const Quaternion & quat)

设置四元数

参数
quat四元数

◆ transformVector() [1/2]

A_ALWAYS_INLINE Vector3d ast::Rotation::transformVector ( const Vector3d & vector) const

变换向量

参数
vector向量
返回
变换后的向量

◆ transformVector() [2/2]

A_ALWAYS_INLINE void ast::Rotation::transformVector ( const Vector3d & vector,
Vector3d & vectorOut ) const

变换向量

参数
vector向量
vectorOut变换后的向量

◆ transformVectorInv() [1/2]

A_ALWAYS_INLINE Vector3d ast::Rotation::transformVectorInv ( const Vector3d & vector) const

变换向量(逆变换)

参数
vector向量
返回
变换后的向量

◆ transformVectorInv() [2/2]

A_ALWAYS_INLINE void ast::Rotation::transformVectorInv ( const Vector3d & vector,
Vector3d & vectorOut ) const

变换向量(逆变换)

警告
注意:这里是逆变换,等价于 inverse().transformVector(...);
参数
vector向量
vectorOut变换后的向量

该类的文档由以下文件生成: