39 #ifndef IECORE_QUATALGO_H
40 #define IECORE_QUATALGO_H
42 #include "OpenEXR/ImathQuat.h"
53 if (x * x < Imath::limits<T>::epsilon())
56 return Imath::Math<T>::sin (x) / x;
63 angle4D (
const Imath::Quat<T> &q1,
const Imath::Quat<T> &q2)
70 Imath::Quat<T> d = q1 - q2;
71 T lengthD = Imath::Math<T>::sqrt (d ^ d);
73 Imath::Quat<T> s = q1 + q2;
74 T lengthS = Imath::Math<T>::sqrt (s ^ s);
76 return 2 * Imath::Math<T>::atan2 (lengthD, lengthS);
84 slerp(
const Imath::Quat<T> &q1,
const Imath::Quat<T> &q2, T t)
111 return q.normalized();
135 #endif // IECORE_QUATALGO_H
T sinx_over_x(T x)
Definition: QuatAlgo.h:51
T angle4D(const Imath::Quat< T > &q1, const Imath::Quat< T > &q2)
Definition: QuatAlgo.h:63
Imath::Quat< T > slerp(const Imath::Quat< T > &q1, const Imath::Quat< T > &q2, T t)
Definition: QuatAlgo.h:84
Imath::Quat< T > slerpShortestArc(const Imath::Quat< T > &q1, const Imath::Quat< T > &q2, T t)
Definition: QuatAlgo.h:119
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43