11 #ifndef EIGEN_EULERANGLES_H
12 #define EIGEN_EULERANGLES_H
41 template<
typename Derived>
50 const Index odd = ((a0 + 1) % 3 == a1) ? 0 : 1;
52 const Index j = (a0 + 1 + odd) % 3;
53 const Index k = (a0 + 2 - odd) % 3;
65 Scalar s2 = numext::hypot(coeff(
j,
i), coeff(k,
i));
98 res[2] =
numext::atan2(c1 * coeff(
j, k) - s1 * coeff(k, k), c1 * coeff(
j,
j) - s1 * coeff(k,
j));
111 Scalar c2 = numext::hypot(coeff(
i,
i), coeff(
i,
j));
137 template<
typename Derived>
146 const Index odd = ((a0 + 1) % 3 == a1) ? 0 : 1;
148 const Index j = (a0 + 1 + odd) % 3;
149 const Index k = (a0 + 2 - odd) % 3;
165 Scalar s2 = numext::hypot(coeff(
j,
i), coeff(k,
i));
170 Scalar s2 = numext::hypot(coeff(
j,
i), coeff(k,
i));
186 res[2] =
numext::atan2(c1 * coeff(
j, k) - s1 * coeff(k, k), c1 * coeff(
j,
j) - s1 * coeff(k,
j));
191 Scalar c2 = numext::hypot(coeff(
i,
i), coeff(
i,
j));
#define EIGEN_DEVICE_FUNC
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
#define EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(TYPE, ROWS, COLS)
internal::traits< Derived >::Scalar Scalar
internal::traits< Matrix< Scalar_, Rows_, Cols_, Options_, MaxRows_, MaxCols_ > >::Scalar Scalar
EIGEN_DEPRECATED Matrix< Scalar, 3, 1 > eulerAngles(Index a0, Index a1, Index a2) const
Matrix< Scalar, 3, 1 > canonicalEulerAngles(Index a0, Index a1, Index a2) const
EIGEN_ALWAYS_INLINE T sin(const T &x)
EIGEN_ALWAYS_INLINE T atan2(const T &y, const T &x)
EIGEN_ALWAYS_INLINE T cos(const T &x)
Eigen::Index Index
The interface type of indices.