Boost C++ Libraries 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


This header defines the quat_traits template which can be specialized to register user-defined quaternion types into Boost QVM.


#include <boost/qvm/quat_traits.hpp>

namespace boost
    namespace qvm
        template <class T>
        struct is_quat
            static bool const value=/*unspecified*/;
        template <class Q>
        struct quat_traits
            /*main template members unspecified*/
        User-defined (possibly partial) specializations:
        template <>
        struct quat_traits<Q>
            typedef /*user-defined*/ scalar_type;        
            template <int I> static inline scalar_type read_element( Quaternion const & q );        
            template <int I> static inline scalar_type & write_element( Quaternion & q );        

See also: is_quat | quat_traits