Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:59:08

0001 #ifndef BOOST_QVM_QUAT_TRAITS_DEFAULTS_HPP_INCLUDED
0002 #define BOOST_QVM_QUAT_TRAITS_DEFAULTS_HPP_INCLUDED
0003 
0004 // Copyright 2008-2022 Emil Dotchevski and Reverge Studios, Inc.
0005 
0006 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0007 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 #include <boost/qvm/config.hpp>
0010 #include <boost/qvm/assert.hpp>
0011 
0012 namespace boost { namespace qvm {
0013 
0014 template <class>
0015 struct quat_traits;
0016 
0017 template <class QuatType,class ScalarType>
0018 struct
0019 quat_traits_defaults
0020     {
0021     typedef QuatType quat_type;
0022     typedef ScalarType scalar_type;
0023 
0024     template <int I>
0025     static
0026     BOOST_QVM_CONSTEXPR BOOST_QVM_INLINE_CRITICAL
0027     scalar_type
0028     read_element( quat_type const & x )
0029         {
0030         return quat_traits<quat_type>::template write_element<I>(const_cast<quat_type &>(x));
0031         }
0032     };
0033 
0034 } }
0035 
0036 #endif