23 template<
typename Type>
26 template<
typename Type>
29 template<
typename Type>
38 template<
typename Type>
51 (*this) = eye<Type, 3>();
96 const Type aa = a * a;
97 const Type ab = a * b;
98 const Type ac = a * c;
99 const Type ad = a * d;
100 const Type bb = b * b;
101 const Type bc = b * c;
102 const Type bd = b * d;
103 const Type cc = c * c;
104 const Type cd = c * d;
105 const Type dd = d * d;
106 dcm(0, 0) = aa + bb - cc - dd;
107 dcm(0, 1) = 2 * (bc - ad);
108 dcm(0, 2) = 2 * (ac + bd);
109 dcm(1, 0) = 2 * (bc + ad);
110 dcm(1, 1) = aa - bb + cc - dd;
111 dcm(1, 2) = 2 * (cd - ab);
112 dcm(2, 0) = 2 * (bd - ac);
113 dcm(2, 1) = 2 * (ab + cd);
114 dcm(2, 2) = aa - bb - cc + dd;
129 Type cosPhi = Type(
cos(euler.
phi()));
130 Type sinPhi = Type(
sin(euler.
phi()));
131 Type cosThe = Type(
cos(euler.
theta()));
132 Type sinThe = Type(
sin(euler.
theta()));
133 Type cosPsi = Type(
cos(euler.
psi()));
134 Type sinPsi = Type(
sin(euler.
psi()));
136 dcm(0, 0) = cosThe * cosPsi;
137 dcm(0, 1) = -cosPhi * sinPsi + sinPhi * sinThe * cosPsi;
138 dcm(0, 2) = sinPhi * sinPsi + cosPhi * sinThe * cosPsi;
140 dcm(1, 0) = cosThe * sinPsi;
141 dcm(1, 1) = cosPhi * cosPsi + sinPhi * sinThe * sinPsi;
142 dcm(1, 2) = -sinPhi * cosPsi + cosPhi * sinThe * sinPsi;
145 dcm(2, 1) = sinPhi * cosThe;
146 dcm(2, 2) = cosPhi * cosThe;
178 for (
size_t r = 0; r < 3; r++) {
Direction cosine matrix class.
Dcm(const Type data_[9])
Constructor from array.
Dcm(const Matrix< Type, 3, 3 > &other)
Copy constructor.
Matrix< Type, N, M > transpose() const
Vector< Type, 3 > vee() const
Dual< Scalar, N > cos(const Dual< Scalar, N > &a)
Dcm(const AxisAngle< Type > &aa)
Constructor from axis angle.
Dcm(const Quaternion< Type > &q)
Constructor from quaternion.
Matrix< Type, 3, 1 > Vector3
Dcm(const Euler< Type > &euler)
Constructor from euler angles.
Vector3 normalized() const
const Slice< Type, 1, N, M, N > row(size_t i) const
Dcm()
Standard constructor.
Dual< Scalar, N > sin(const Dual< Scalar, N > &a)
Dcm(const Type data_[3][3])
Constructor from array.