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_6D6B1EE2119A11E291554FEE6188709B
7 #define UUID_6D6B1EE2119A11E291554FEE6188709B
9 #include <boost/qvm/inline.hpp>
10 #include <boost/qvm/deduce_quat.hpp>
11 #include <boost/qvm/detail/remove_const.hpp>
12 #include <boost/qvm/assert.hpp>
20 template <class T,int D>
24 typedef void scalar_type;
26 template <class T,int D>
30 typedef void scalar_type;
32 template <class T,int D>
36 typedef void scalar_type;
42 typedef void scalar_type;
44 template <class T,int M,int N>
48 typedef void scalar_type;
55 typedef T this_quaternion[4];
56 typedef typename qvm_detail::remove_const<T>::type scalar_type;
60 BOOST_QVM_INLINE_CRITICAL
62 read_element( this_quaternion const & x )
64 BOOST_QVM_STATIC_ASSERT(I>=0);
65 BOOST_QVM_STATIC_ASSERT(I<4);
71 BOOST_QVM_INLINE_CRITICAL
73 write_element( this_quaternion & x )
75 BOOST_QVM_STATIC_ASSERT(I>=0);
76 BOOST_QVM_STATIC_ASSERT(I<4);
81 BOOST_QVM_INLINE_CRITICAL
83 read_element_idx( int i, this_quaternion const & x )
85 BOOST_QVM_ASSERT(i>=0);
86 BOOST_QVM_ASSERT(i<4);
91 BOOST_QVM_INLINE_CRITICAL
93 write_element_idx( int i, this_quaternion & x )
95 BOOST_QVM_ASSERT(i>=0);
96 BOOST_QVM_ASSERT(i<4);
105 typedef quat<T> type;
110 deduce_quat<T const[4]>
112 typedef quat<T> type;
115 template <class T1,class T2>
117 deduce_quat2<T1[4],T2[4]>
119 typedef quat<typename deduce_scalar<T1,T2>::type> type;
123 T (&ptr_qref( T * ptr ))[4]
125 return *reinterpret_cast<T (*)[4]>(ptr);