17 template <
typename Real>
50 template <
typename Real>
57 template <
typename Real>
61 template <
typename Real>
66 template <
typename Real>
89 template <
typename Real>
104 template <
typename Real>
124 template <
typename Real>
129 template <
typename Real>
135 template <
typename Real>
144 template <
typename Real>
153 template <
typename Real>
162 template <
typename Real>
169 template <
typename Real>
176 template <
typename Real>
179 return Quaternion((Real)0, (Real)0, (Real)0, (Real)0);
182 template <
typename Real>
185 return Quaternion((Real)1, (Real)0, (Real)0, (Real)0);
188 template <
typename Real>
191 return Quaternion((Real)0, (Real)1, (Real)0, (Real)0);
194 template <
typename Real>
197 return Quaternion((Real)0, (Real)0, (Real)1, (Real)0);
200 template <
typename Real>
203 return Quaternion((Real)0, (Real)0, (Real)0, (Real)1);
206 template <
typename Real>
219 +q0[0] * q1[3] + q0[1] * q1[2] - q0[2] * q1[1] + q0[3] * q1[0],
220 -q0[0] * q1[2] + q0[1] * q1[3] + q0[2] * q1[0] + q0[3] * q1[1],
221 +q0[0] * q1[1] - q0[1] * q1[0] + q0[2] * q1[3] + q0[3] * q1[2],
222 -q0[0] * q1[0] - q0[1] * q1[1] - q0[2] * q1[2] + q0[3] * q1[3]
226 template <
typename Real>
229 Real sqrLen =
Dot(q, q);
230 if (sqrLen > (Real)0)
232 Real invSqrLen = ((Real)1) / sqrLen;
242 template <
typename Real>
248 template <
typename Real>
258 template <
typename Real>
262 Real cosA =
Dot(q0, q1);
276 return q0 * f0 + q1 * (sign * f1);
279 template <
typename Real>
285 return q0 * f0 + q1 * f1;
288 template <
typename Real>
294 return q0 * f0 + q1 * f1;
DualQuaternion< Real > Conjugate(DualQuaternion< Real > const &d)
Quaternion< Real > Slerp(Real t, Quaternion< Real > const &q0, Quaternion< Real > const &q1)
static void Get(Real t, Real cosA, Real &f0, Real &f1)
GLubyte GLubyte GLubyte GLubyte w
Quaternion< Real > SlerpR(Real t, Quaternion< Real > const &q0, Quaternion< Real > const &q1)
Vector< 4, Real > Rotate(Quaternion< Real > const &q, Vector< 4, Real > const &v)
std::array< Real, N > mTuple
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
GLdouble GLdouble GLdouble z
static Quaternion Identity()
GLdouble GLdouble GLdouble GLdouble q
Quaternion< Real > Inverse(Quaternion< Real > const &d)
Quaternion< Real > SlerpRP(Real t, Quaternion< Real > const &q0, Quaternion< Real > const &q1, Real cosA)
Vector4< float > operator*(Transform const &M, Vector4< float > const &V)
Quaternion & operator=(Quaternion const &q)