165 template <
typename Real>
196 template <
typename Real>
199 template <
typename Real>
203 template <
typename Real>
206 template <
typename Real>
209 template <
typename Real>
212 template <
typename Real>
215 template <
typename Real>
218 template <
typename Real>
221 template <
typename Real>
224 template <
typename Real>
227 template <
typename Real>
231 template <
typename Real>
235 template <
typename Real>
241 template <
typename Real>
246 template <
int N,
typename Real>
249 template <
int N,
typename Real>
252 template <
int N,
typename Real>
255 template <
int N,
typename Real>
261 template <
typename Real>
265 template <
typename Real>
271 template <
typename Real>
280 template <
typename Real>
289 template <
typename Real>
298 template <
typename Real>
305 template <
typename Real>
312 template <
typename Real>
315 return Quaternion((Real)0, (Real)0, (Real)0, (Real)0);
318 template <
typename Real>
321 return Quaternion((Real)1, (Real)0, (Real)0, (Real)0);
324 template <
typename Real>
327 return Quaternion((Real)0, (Real)1, (Real)0, (Real)0);
330 template <
typename Real>
333 return Quaternion((Real)0, (Real)0, (Real)1, (Real)0);
336 template <
typename Real>
339 return Quaternion((Real)0, (Real)0, (Real)0, (Real)1);
342 template <
typename Real>
355 +q0[0] * q1[3] + q0[1] * q1[2] - q0[2] * q1[1] + q0[3] * q1[0],
356 -q0[0] * q1[2] + q0[1] * q1[3] + q0[2] * q1[0] + q0[3] * q1[1],
357 +q0[0] * q1[1] - q0[1] * q1[0] + q0[2] * q1[3] + q0[3] * q1[2],
358 -q0[0] * q1[0] - q0[1] * q1[1] - q0[2] * q1[2] + q0[3] * q1[3]
362 template <
typename Real>
365 Real sqrLen =
Dot(q, q);
366 if (sqrLen > (Real)0)
368 Real invSqrLen = ((Real)1) / sqrLen;
378 template <
typename Real>
384 template <
typename Real>
394 template <
typename Real>
398 Real cosA =
Dot(q0, q1);
412 return q0 * f0 + q1 * (sign * f1);
415 template <
typename Real>
421 return q0 * f0 + q1 * f1;
424 template <
typename Real>
430 return q0 * f0 + q1 * f1;
DualQuaternion< Real > Conjugate(DualQuaternion< Real > const &d)
DualQuaternion< Real > & operator*=(DualQuaternion< Real > &d, Real scalar)
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
static DualQuaternion Zero()
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)
DualQuaternion< Real > operator+(DualQuaternion< Real > const &d)
static DualQuaternion Identity()
DualQuaternion< Real > Norm(DualQuaternion< Real > &d, bool robust=false)
DualQuaternion< Real > & operator-=(DualQuaternion< Real > &d0, DualQuaternion< Real > const &d1)
DualQuaternion< Real > Dot(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
DualQuaternion< Real > Cross(DualQuaternion< Real > const &d0, DualQuaternion< Real > const &d1)
Vector< 4, Real > RigidTransform(DualQuaternion< Real > const &d, Vector< 4, Real > const &v)
GLdouble GLdouble GLdouble z
Quaternion< Real > const & operator[](int i) const
DualQuaternion< Real > Length(DualQuaternion< Real > const &d, bool robust=false)
static Quaternion Identity()
DualQuaternion & operator=(DualQuaternion const &d)
DualQuaternion< Real > operator-(DualQuaternion< Real > const &d)
GLdouble GLdouble GLdouble GLdouble q
DualQuaternion< Real > & operator+=(DualQuaternion< Real > &d0, DualQuaternion< Real > const &d1)
Quaternion< Real > Inverse(Quaternion< Real > const &d)
Quaternion< Real > SlerpRP(Real t, Quaternion< Real > const &q0, Quaternion< Real > const &q1, Real cosA)
DualQuaternion< Real > & operator/=(DualQuaternion< Real > &d, Real scalar)
Vector4< float > operator*(Transform const &M, Vector4< float > const &V)
std::array< Quaternion< Real >, 2 > mTuple
DualQuaternion< Real > operator/(DualQuaternion< Real > const &d, Real scalar)
Quaternion & operator=(Quaternion const &q)