]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | #ifndef BOOST_QVM_QUAT_TRAITS_DEFAULTS_HPP_INCLUDED |
2 | #define BOOST_QVM_QUAT_TRAITS_DEFAULTS_HPP_INCLUDED | |
92f5a8d4 | 3 | |
1e59de90 | 4 | // Copyright 2008-2022 Emil Dotchevski and Reverge Studios, Inc. |
92f5a8d4 | 5 | |
1e59de90 TL |
6 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
7 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
92f5a8d4 TL |
8 | |
9 | #include <boost/qvm/inline.hpp> | |
10 | #include <boost/qvm/assert.hpp> | |
11 | ||
1e59de90 TL |
12 | namespace boost { namespace qvm { |
13 | ||
14 | template <class> | |
15 | struct quat_traits; | |
16 | ||
17 | template <class QuatType,class ScalarType> | |
18 | struct | |
19 | quat_traits_defaults | |
92f5a8d4 | 20 | { |
1e59de90 TL |
21 | typedef QuatType quat_type; |
22 | typedef ScalarType scalar_type; | |
23 | ||
24 | template <int I> | |
25 | static | |
26 | BOOST_QVM_CONSTEXPR BOOST_QVM_INLINE_CRITICAL | |
27 | scalar_type | |
28 | read_element( quat_type const & x ) | |
92f5a8d4 | 29 | { |
1e59de90 | 30 | return quat_traits<quat_type>::template write_element<I>(const_cast<quat_type &>(x)); |
92f5a8d4 | 31 | } |
1e59de90 TL |
32 | }; |
33 | ||
34 | } } | |
92f5a8d4 TL |
35 | |
36 | #endif |