21 #ifndef yap_Rotation_h
22 #define yap_Rotation_h
37 if (v == 0 || theta == 0)
38 return unitMatrix<T, 3>();
41 ThreeVector<T> U = V * (T(1) / v);
43 T cosTheta = cos(theta);
45 return ((T)1 - cosTheta) *
outer(U, U) + cosTheta * unitMatrix<T, 3>() + (T)sin(theta) *
skewSymmetric(U);
56 const ThreeMatrix<T>
eulerRotationZXZ(
const CoordinateSystem<T, 3>& C,
const T& alpha,
const T& beta,
const T& gamma)
67 const ThreeMatrix<T>
eulerRotationZYZ(
const CoordinateSystem<T, 3>& C,
const T& alpha,
const T& beta,
const T& gamma)
const ThreeMatrix< T > rotation(const ThreeVector< T > &V, const T &theta)
Definition: Rotation.h:33
const ThreeMatrix< T > eulerRotationZYZ(const CoordinateSystem< T, 3 > &C, const T &alpha, const T &beta, const T &gamma)
Definition: Rotation.h:67
constexpr T theta(const ThreeVector< T > &V, const CoordinateSystem< T, 3 > &C)
Definition: CoordinateSystem.h:101
constexpr T abs(const Vector< T, N > &A)
Definition: Vector.h:371
constexpr SquareMatrix< T, 3 > skewSymmetric(const ThreeVector< T > V) noexcept
skew symmetric matrix formed from a 3 vector
Definition: ThreeVector.h:38
const ThreeMatrix< T > eulerRotationZXZ(const CoordinateSystem< T, 3 > &C, const T &alpha, const T &beta, const T &gamma)
Definition: Rotation.h:56
const SquareMatrix< T, N > outer(const Vector< T, N > &A, const Vector< T, N > &B)
outer product
Definition: Vector.h:405