🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
Axes.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstCore/Object.hpp"
25
26AST_NAMESPACE_BEGIN
27
33class Rotation;
34class KinematicRotation;
35class Axes;
36using PAxes = Axes*;
38
45AST_CORE_API errc_t aAxesTransform(Axes* source, Axes* target, const TimePoint& tp, Rotation& rotation);
46
47
54AST_CORE_API errc_t aAxesTransform(Axes* source, Axes* target, const TimePoint& tp, Matrix3d& matrix);
55
56
63AST_CORE_API errc_t aAxesTransform(Axes* source, Axes* target, const TimePoint& tp, KinematicRotation& rotation);
64
65
68class AST_CORE_API Axes : public Object
69{
70public:
71 ~Axes() override = default;
72
75 virtual Axes* getParent() const = 0;
76
81 virtual errc_t getTransform(const TimePoint& tp, Rotation& rotation) const = 0;
82
87 virtual errc_t getTransform(const TimePoint& tp, KinematicRotation& rotation) const = 0;
88public:
91 int getDepth() const;
92
96 Axes* getAncestor(int depth) const;
97
98public:
104 A_ALWAYS_INLINE
105 errc_t getTransformTo(Axes* target, const TimePoint& tp, Rotation& rotation) const
106 {
107 return aAxesTransform(const_cast<Axes*>(this), target, tp, rotation);
108 }
114 A_ALWAYS_INLINE
115 errc_t getTransformTo(Axes* target, const TimePoint& tp, KinematicRotation& rotation) const
116 {
117 return aAxesTransform(const_cast<Axes*>(this), target, tp, rotation);
118 }
124 A_ALWAYS_INLINE
125 errc_t getTransformFrom(Axes* source, const TimePoint& tp, Rotation& rotation) const
126 {
127 return aAxesTransform(source, const_cast<Axes*>(this), tp, rotation);
128 }
134 A_ALWAYS_INLINE
135 errc_t getTransformFrom(Axes* source, const TimePoint& tp, KinematicRotation& rotation) const
136 {
137 return aAxesTransform(source, const_cast<Axes*>(this), tp, rotation);
138 }
143 A_ALWAYS_INLINE
144 errc_t getTransformFromParent(const TimePoint& tp, Rotation& rotation) const
145 {
146 return getTransform(tp, rotation);
147 }
152 A_ALWAYS_INLINE
153 errc_t getTransformFromParent(const TimePoint& tp, KinematicRotation& rotation) const
154 {
155 return getTransform(tp, rotation);
156 }
157};
158
159using PAxes = Axes*;
160using HAxes = SharedPtr<Axes>;
161
164AST_NAMESPACE_END
轴系类
定义 Axes.hpp:69
A_ALWAYS_INLINE errc_t getTransformFromParent(const TimePoint &tp, KinematicRotation &rotation) const
获取当前轴系相对于父轴系的运动学旋转信息。
定义 Axes.hpp:153
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:125
A_ALWAYS_INLINE errc_t getTransformFrom(Axes *source, const TimePoint &tp, KinematicRotation &rotation) const
获取源轴系到当前轴系的运动学旋转变换。
定义 Axes.hpp:135
A_ALWAYS_INLINE errc_t getTransformFromParent(const TimePoint &tp, Rotation &rotation) const
获取当前轴系相对于父轴系的旋转信息。
定义 Axes.hpp:144
A_ALWAYS_INLINE errc_t getTransformTo(Axes *target, const TimePoint &tp, KinematicRotation &rotation) const
获取当前轴系到目标轴系的运动学旋转变换。
定义 Axes.hpp:115
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:105
运动学坐标系旋转
定义 KinematicRotation.hpp:32
对象基类,继承自该类的对象可以使用运行时类型信息相关功能,实现强弱引用计数、运行时元信息(属性访问、序列化等)等基础功能
定义 Object.hpp:81
坐标系旋转类
定义 Rotation.hpp:39
绝对时间点
定义 TimePoint.hpp:106
errc_t aAxesTransform(Axes *source, Axes *target, const TimePoint &tp, Rotation &rotation)
计算轴系之间的旋转变换。
定义 Axes.cpp:185