summaryrefslogtreecommitdiffhomepage
path: root/compat/euler.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-11-12 11:58:54 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-11-12 12:04:27 +0100
commita680c4573fb83e26caa8daee08d08dc045710dd6 (patch)
treeb4a7abfc1525263c1ec940351b89b23f774e05be /compat/euler.hpp
parente5d2902e11ae6ea2e26e0caa6588384225e018f6 (diff)
compat: move from simple-mat.hpp to euler.hpp
Diffstat (limited to 'compat/euler.hpp')
-rw-r--r--compat/euler.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/compat/euler.hpp b/compat/euler.hpp
new file mode 100644
index 00000000..6a1ea1a4
--- /dev/null
+++ b/compat/euler.hpp
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "export.hpp"
+#include "simple-mat.hpp"
+
+namespace euler {
+
+template<int h_, int w_> using dmat = Mat<double, h_, w_>;
+
+using dvec2 = Mat<double, 2, 1>;
+using dvec3 = Mat<double, 3, 1>;
+
+using rmat = dmat<3, 3>;
+using euler_t = dmat<3, 1>;
+
+rmat OPENTRACK_COMPAT_EXPORT euler_to_rmat(const euler_t& input);
+
+euler_t OPENTRACK_COMPAT_EXPORT rmat_to_euler(const rmat& R);
+
+void OPENTRACK_COMPAT_EXPORT tait_bryan_to_matrices(const euler_t& input,
+ rmat& r_roll,
+ rmat& r_pitch,
+ rmat& r_yaw);
+
+} // end ns euler