9 #include <boost/test/unit_test.hpp>
26 const double beta = 0;
34 double sz = std::sin(gamma);
36 double sy = std::sin(beta);
38 double sx = std::sin(alpha);
47 expRot.col(0) =
Vector3D(cz * cy, cy * sz, -sy);
49 Vector3D(cz * sy * sx - cx * sz, cz * cx + sz * sy * sx, cy * sx);
51 Vector3D(sz * sx + cz * cx * sy, cx * sz * sy - cz * sx, cy * cx);
55 expRotToXAxis.col(0) =
Vector3D(0, 0, 0);
56 expRotToXAxis.col(1) =
Vector3D(-cz * sy, -sz * sy, -cy);
57 expRotToXAxis.col(2) =
Vector3D(-sz * cy, cz * cy, 0);
61 expRotToYAxis.col(0) =
62 Vector3D(cz * sy * cx + sz * sx, sz * sy * cx - cz * sx, cy * cx);
63 expRotToYAxis.col(1) =
Vector3D(cz * cy * sx, sz * cy * sx, -sy * sx);
64 expRotToYAxis.col(2) =
65 Vector3D(-sz * sy * sx - cz * cx, cz * sy * sx - sz * cx, 0);
69 expRotToZAxis.col(0) =
70 Vector3D(sz * cx - cz * sy * sx, -sz * sy * sx - cz * cx, -cy * sx);
71 expRotToZAxis.col(1) =
Vector3D(cz * cy * cx, sz * cy * cx, -sy * cx);
72 expRotToZAxis.col(2) =
73 Vector3D(cz * sx - sz * sy * cx, cz * sy * cx + sz * sx, 0);
83 const auto rotation = transform.rotation();
90 const auto& [rotToLocalXAxis, rotToLocalYAxis, rotToLocalZAxis] =
107 const auto& [irotToLocalXAxis, irotToLocalYAxis, irotToLocalZAxis] =
111 expRotToXAxis << 0, 0, 0, 0, 0, 1, 0, -1, 0;
112 expRotToYAxis << 0, 0, -1, 0, 0, 0, 1, 0, 0;
113 expRotToZAxis << 0, 1, 0, -1, 0, 0, 0, 0, 0;