24 #ifndef BASE_CONVERTER_H 25 #define BASE_CONVERTER_H 41 inline std::tuple<float_type,float_type,float_type>
get()
const {
42 return std::make_tuple(v.x, v.y, v.z);
53 inline std::tuple<float_type,float_type,float_type>
get()
const {
54 return std::make_tuple(v.x, v.y, v.z);
65 inline std::tuple<float_type,float_type,float_type,float_type>
get()
const {
67 v.getValue(q1,q2,q3,q4);
68 return std::make_tuple(q1, q2, q3, q4);
75 template <
class _Vec,
typename float_type>
76 _Vec
make_vec(
const std::tuple<float_type, float_type, float_type>&& t) {
78 typedef typename traits_type::float_type float_traits_type;
79 return _Vec(float_traits_type(std::get<0>(t)),
80 float_traits_type(std::get<1>(t)),
81 float_traits_type(std::get<2>(t)));
85 template <
class _Vec,
typename float_type>
86 _Vec
make_vec(
const std::tuple<float_type, float_type, float_type, float_type>&& t) {
88 typedef typename traits_type::float_type float_traits_type;
89 return _Vec(float_traits_type(std::get<0>(t)),
90 float_traits_type(std::get<1>(t)),
91 float_traits_type(std::get<2>(t)),
92 float_traits_type(std::get<3>(t)));
95 template <
class _Vec1,
class _Vec2>
99 typedef typename traits_type::float_type float_type;
101 auto tuple = t.get();
102 return make_vec<_Vec1, float_type>(std::move(tuple));
107 #endif // BASE_CONVERTER_H Vector3f vec_type
Definition: Converter.h:38
_Vec1 convertTo(const _Vec2 &v)
Definition: Converter.h:96
_Vec make_vec(const std::tuple< float_type, float_type, float_type > &&t)
Definition: Converter.h:76
Vector3d vec_type
Definition: Converter.h:50
vec_traits(const vec_type &v)
Definition: Converter.h:52
double float_type
Definition: Converter.h:63
double float_type
Definition: Converter.h:51
std::tuple< float_type, float_type, float_type > get() const
Definition: Converter.h:41
Definition: Converter.h:34
Rotation vec_type
Definition: Converter.h:62
float float_type
Definition: Converter.h:39
Definition: AbstractXMLReader.h:5
Definition: Vector3D.h:78
vec_traits(const vec_type &v)
Definition: Converter.h:64
std::tuple< float_type, float_type, float_type, float_type > get() const
Definition: Converter.h:65
vec_traits(const vec_type &v)
Definition: Converter.h:40
Definition: Rotation.h:34
std::tuple< float_type, float_type, float_type > get() const
Definition: Converter.h:53