1 //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef UUID_57E1C032B9F311DEB7D9BAFE55D89593
7 #define UUID_57E1C032B9F311DEB7D9BAFE55D89593
9 #include <boost/qvm/quat_traits.hpp>
10 #include <boost/qvm/vec_traits.hpp>
11 #include <boost/qvm/mat_traits.hpp>
12 #include <boost/qvm/inline.hpp>
20 template <class Scalar>
25 BOOST_QVM_INLINE_CRITICAL
37 static bool const value=false;
39 template <> struct is_scalar<char> { static bool const value=true; };
40 template <> struct is_scalar<signed char> { static bool const value=true; };
41 template <> struct is_scalar<unsigned char> { static bool const value=true; };
42 template <> struct is_scalar<signed short> { static bool const value=true; };
43 template <> struct is_scalar<unsigned short> { static bool const value=true; };
44 template <> struct is_scalar<signed int> { static bool const value=true; };
45 template <> struct is_scalar<unsigned int> { static bool const value=true; };
46 template <> struct is_scalar<signed long> { static bool const value=true; };
47 template <> struct is_scalar<unsigned long> { static bool const value=true; };
48 template <> struct is_scalar<float> { static bool const value=true; };
49 template <> struct is_scalar<double> { static bool const value=true; };
54 template <class A,bool M=is_mat<A>::value,bool Q=is_quat<A>::value,bool V=is_vec<A>::value>
62 scalar_impl<A,true,false,false>
64 typedef typename mat_traits<A>::scalar_type type;
69 scalar_impl<A,false,true,false>
71 typedef typename quat_traits<A>::scalar_type type;
76 scalar_impl<A,false,false,true>
78 typedef typename vec_traits<A>::scalar_type type;
86 typedef typename qvm_detail::scalar_impl<A>::type type;