Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

QVM: Quaternions, Vectors, Matrices

slerp

#include <boost/qvm/quat_operations.hpp>

namespace boost
{
    namespace qvm
    {
        //Only enabled if:
        //  is_quat<A>::value && is_quat<B>::value && is_scalar<C>
        template <class A,class B,class C>
        typename deduce_quat2<A,B> >::type
        slerp( A const & a, B const & b, C c );
    }
}

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 c. 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.