Boost QVM

slerp

#include <boost/qvm/q.hpp>

namespace boost
{
    namespace qvm
    {
        //Only enabled if:
        //  is_q<A>::value && is_q<B>::value
        template <class A,class B>
        typename deduce_q2<A,B> >::type
        slerp( A const & a, B const & b, typename q_traits<typename deduce_q2<A,B>::type>::scalar_type t );
    }
}

Preconditions:

t>=0 && t<=1.

Returns:

A quaternion that is the result of Spherical Linear Interpolation of the quaternions a and b and the interpolation parameter t. When slerp is applied to unit quaternions, the quaternion path maps to a path through 3D rotations in a standard way. The effect is a rotation with uniform angular velocity around a fixed rotation axis.


See also: boost/qvm/q.hpp