🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
Axes.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/Object.hpp"
25#include "AstUtil/ObjectNamed.hpp"
26
27AST_NAMESPACE_BEGIN
28
34class Rotation;
35class KinematicRotation;
36class Axes;
37using PAxes = Axes*;
39
46AST_CORE_API errc_t aAxesTransform(Axes* source, Axes* target, const TimePoint& tp, Rotation& rotation);
47
48
55AST_CORE_API errc_t aAxesTransform(Axes* source, Axes* target, const TimePoint& tp, Matrix3d& matrix);
56
57
64AST_CORE_API errc_t aAxesTransform(Axes* source, Axes* target, const TimePoint& tp, KinematicRotation& rotation);
65
66
69class AST_CORE_API Axes : public ObjectNamed
70{
71public:
72 AST_OBJECT(Axes)
73 ~Axes() override = default;
74
77 virtual Axes* getParent() const = 0;
78
83 virtual errc_t getTransform(const TimePoint& tp, Rotation& rotation) const = 0;
84
89 virtual errc_t getTransform(const TimePoint& tp, KinematicRotation& rotation) const = 0;
90public:
93 int getDepth() const;
94
98 Axes* getAncestor(int depth) const;
99
100public:
106 A_ALWAYS_INLINE
107 errc_t getTransformTo(Axes* target, const TimePoint& tp, Rotation& rotation) const
108 {
109 return aAxesTransform(const_cast<Axes*>(this), target, tp, rotation);
110 }
116 A_ALWAYS_INLINE
117 errc_t getTransformTo(Axes* target, const TimePoint& tp, KinematicRotation& rotation) const
118 {
119 return aAxesTransform(const_cast<Axes*>(this), target, tp, rotation);
120 }
126 A_ALWAYS_INLINE
127 errc_t getTransformFrom(Axes* source, const TimePoint& tp, Rotation& rotation) const
128 {
129 return aAxesTransform(source, const_cast<Axes*>(this), tp, rotation);
130 }
136 A_ALWAYS_INLINE
137 errc_t getTransformFrom(Axes* source, const TimePoint& tp, KinematicRotation& rotation) const
138 {
139 return aAxesTransform(source, const_cast<Axes*>(this), tp, rotation);
140 }
145 A_ALWAYS_INLINE
146 errc_t getTransformFromParent(const TimePoint& tp, Rotation& rotation) const
147 {
148 return getTransform(tp, rotation);
149 }
154 A_ALWAYS_INLINE
155 errc_t getTransformFromParent(const TimePoint& tp, KinematicRotation& rotation) const
156 {
157 return getTransform(tp, rotation);
158 }
159};
160
161using PAxes = Axes*;
162using HAxes = SharedPtr<Axes>;
163
166AST_NAMESPACE_END
轴系类
定义 Axes.hpp:70
A_ALWAYS_INLINE errc_t getTransformFromParent(const TimePoint &tp, KinematicRotation &rotation) const
获取当前轴系相对于父轴系的运动学旋转信息。
定义 Axes.hpp:155
virtual errc_t getTransform(const TimePoint &tp, KinematicRotation &rotation) const =0
获取当前轴系相对于父轴系的运动学旋转信息
virtual Axes * getParent() const =0
获取当前轴系的父轴系
A_ALWAYS_INLINE errc_t getTransformFrom(Axes *source, const TimePoint &tp, Rotation &rotation) const
获取源轴系到当前轴系的旋转变换。
定义 Axes.hpp:127
A_ALWAYS_INLINE errc_t getTransformFrom(Axes *source, const TimePoint &tp, KinematicRotation &rotation) const
获取源轴系到当前轴系的运动学旋转变换。
定义 Axes.hpp:137
A_ALWAYS_INLINE errc_t getTransformFromParent(const TimePoint &tp, Rotation &rotation) const
获取当前轴系相对于父轴系的旋转信息。
定义 Axes.hpp:146
A_ALWAYS_INLINE errc_t getTransformTo(Axes *target, const TimePoint &tp, KinematicRotation &rotation) const
获取当前轴系到目标轴系的运动学旋转变换。
定义 Axes.hpp:117
virtual errc_t getTransform(const TimePoint &tp, Rotation &rotation) const =0
获取当前轴系相对于父轴系的旋转信息
A_ALWAYS_INLINE errc_t getTransformTo(Axes *target, const TimePoint &tp, Rotation &rotation) const
获取当前轴系到目标轴系的旋转变换
定义 Axes.hpp:107
运动学坐标系旋转
定义 KinematicRotation.hpp:32
命名对象
定义 ObjectNamed.hpp:36
坐标系旋转类
定义 Rotation.hpp:39
绝对时间点
定义 TimePoint.hpp:106
errc_t aAxesTransform(Axes *source, Axes *target, const TimePoint &tp, Rotation &rotation)
计算轴系之间的旋转变换。
定义 Axes.cpp:185