1
///////////////////////////////////////////////////////////////////////////////////
2
/// OpenGL Mathematics (glm.g-truc.net)
4
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5
/// Permission is hereby granted, free of charge, to any person obtaining a copy
6
/// of this software and associated documentation files (the "Software"), to deal
7
/// in the Software without restriction, including without limitation the rights
8
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
/// copies of the Software, and to permit persons to whom the Software is
10
/// furnished to do so, subject to the following conditions:
12
/// The above copyright notice and this permission notice shall be included in
13
/// all copies or substantial portions of the Software.
15
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
/// @file glm/core/_vectorize.hpp
25
/// @date 2011-10-14 / 2011-10-14
26
/// @author Christophe Riccio
27
///////////////////////////////////////////////////////////////////////////////////
29
#define VECTORIZE2_VEC(func) \
30
template <typename T> \
31
GLM_FUNC_QUALIFIER detail::tvec2<T> func( \
32
detail::tvec2<T> const & v) \
34
return detail::tvec2<T>( \
39
#define VECTORIZE3_VEC(func) \
40
template <typename T> \
41
GLM_FUNC_QUALIFIER detail::tvec3<T> func( \
42
detail::tvec3<T> const & v) \
44
return detail::tvec3<T>( \
50
#define VECTORIZE4_VEC(func) \
51
template <typename T> \
52
GLM_FUNC_QUALIFIER detail::tvec4<T> func( \
53
detail::tvec4<T> const & v) \
55
return detail::tvec4<T>( \
62
#define VECTORIZE_VEC(func) \
63
VECTORIZE2_VEC(func) \
64
VECTORIZE3_VEC(func) \
67
#define VECTORIZE2_VEC_SCA(func) \
68
template <typename T> \
69
GLM_FUNC_QUALIFIER detail::tvec2<T> func \
71
detail::tvec2<T> const & x, \
72
typename detail::tvec2<T>::value_type const & y \
75
return detail::tvec2<T>( \
80
#define VECTORIZE3_VEC_SCA(func) \
81
template <typename T> \
82
GLM_FUNC_QUALIFIER detail::tvec3<T> func \
84
detail::tvec3<T> const & x, \
85
typename detail::tvec3<T>::value_type const & y \
88
return detail::tvec3<T>( \
94
#define VECTORIZE4_VEC_SCA(func) \
95
template <typename T> \
96
GLM_FUNC_QUALIFIER detail::tvec4<T> func \
98
detail::tvec4<T> const & x, \
99
typename detail::tvec4<T>::value_type const & y \
102
return detail::tvec4<T>( \
109
#define VECTORIZE_VEC_SCA(func) \
110
VECTORIZE2_VEC_SCA(func) \
111
VECTORIZE3_VEC_SCA(func) \
112
VECTORIZE4_VEC_SCA(func)
114
#define VECTORIZE2_VEC_VEC(func) \
115
template <typename T> \
116
GLM_FUNC_QUALIFIER detail::tvec2<T> func \
118
detail::tvec2<T> const & x, \
119
detail::tvec2<T> const & y \
122
return detail::tvec2<T>( \
127
#define VECTORIZE3_VEC_VEC(func) \
128
template <typename T> \
129
GLM_FUNC_QUALIFIER detail::tvec3<T> func \
131
detail::tvec3<T> const & x, \
132
detail::tvec3<T> const & y \
135
return detail::tvec3<T>( \
141
#define VECTORIZE4_VEC_VEC(func) \
142
template <typename T> \
143
GLM_FUNC_QUALIFIER detail::tvec4<T> func \
145
detail::tvec4<T> const & x, \
146
detail::tvec4<T> const & y \
149
return detail::tvec4<T>( \
156
#define VECTORIZE_VEC_VEC(func) \
157
VECTORIZE2_VEC_VEC(func) \
158
VECTORIZE3_VEC_VEC(func) \
159
VECTORIZE4_VEC_VEC(func)