29 #ifndef glm_core_type_gentype3 30 #define glm_core_type_gentype3 41 template <
typename T>
struct tref2;
42 template <
typename T>
struct tref3;
43 template <
typename T>
struct tref4;
44 template <
typename T>
struct tvec2;
45 template <
typename T>
struct tvec4;
55 typedef std::size_t size_type;
56 GLM_FUNC_DECL size_type length()
const;
58 typedef tvec3<T> type;
59 typedef tvec3<bool> bool_type;
64 # if(GLM_COMPONENT == GLM_COMPONENT_CXX11) 67 # if(defined(GLM_SWIZZLE)) 69 _GLM_SWIZZLE3_2_MEMBERS(value_type,
glm::detail::tvec2<value_type>, r, g, b)
70 _GLM_SWIZZLE3_2_MEMBERS(value_type,
glm::detail::tvec2<value_type>, s, t, p)
71 _GLM_SWIZZLE3_3_MEMBERS(value_type,
glm::detail::tvec3<value_type>, x, y, z)
72 _GLM_SWIZZLE3_3_MEMBERS(value_type,
glm::detail::tvec3<value_type>, r, g, b)
73 _GLM_SWIZZLE3_3_MEMBERS(value_type,
glm::detail::tvec3<value_type>, s, t, p)
74 _GLM_SWIZZLE3_4_MEMBERS(value_type,
glm::detail::tvec4<value_type>, x, y, z)
75 _GLM_SWIZZLE3_4_MEMBERS(value_type,
glm::detail::tvec4<value_type>, r, g, b)
76 _GLM_SWIZZLE3_4_MEMBERS(value_type,
glm::detail::tvec4<value_type>, s, t, p)
77 # endif//(defined(GLM_SWIZZLE)) 79 struct{value_type r, g, b;};
80 struct{value_type s, t, p;};
81 struct{value_type x, y, z;};
83 # elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) 84 union {value_type x, r, s;};
85 union {value_type y, g, t;};
86 union {value_type z, b, p;};
88 # if(defined(GLM_SWIZZLE)) 90 GLM_SWIZZLE_GEN_REF_FROM_VEC3(T, detail::tvec3, detail::tref2, detail::tref3)
91 GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4)
92 # endif//(defined(GLM_SWIZZLE)) 93 # else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) 96 # if(defined(GLM_SWIZZLE)) 98 GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, detail::tvec3, detail::tref2, detail::tref3, x, y, z)
99 GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4, x, y, z)
100 # endif//(defined(GLM_SWIZZLE)) 101 # endif//GLM_COMPONENT 106 GLM_FUNC_DECL value_type & operator[](size_type i);
107 GLM_FUNC_DECL value_type
const & operator[](size_type i)
const;
112 GLM_FUNC_DECL tvec3();
113 GLM_FUNC_DECL tvec3(tvec3<T>
const & v);
118 GLM_FUNC_DECL
explicit tvec3(
120 GLM_FUNC_DECL
explicit tvec3(
121 value_type
const & s);
122 GLM_FUNC_DECL
explicit tvec3(
123 value_type
const & s1,
124 value_type
const & s2,
125 value_type
const & s3);
131 template <
typename U>
132 GLM_FUNC_DECL
explicit tvec3(
135 template <
typename U,
typename V,
typename W>
136 GLM_FUNC_DECL
explicit tvec3(
145 template <
typename A,
typename B>
146 GLM_FUNC_DECL
explicit tvec3(tvec2<A>
const & v, B
const & s);
148 template <
typename A,
typename B>
149 GLM_FUNC_DECL
explicit tvec3(A
const & s, tvec2<B>
const & v);
151 template <
typename U>
152 GLM_FUNC_DECL
explicit tvec3(tvec3<U>
const & v);
154 template <
typename U>
155 GLM_FUNC_DECL
explicit tvec3(tvec4<U>
const & v);
160 GLM_FUNC_DECL tvec3(tref3<T>
const & r);
162 template <
typename A,
typename B>
163 GLM_FUNC_DECL
explicit tvec3(tref2<A>
const & v, B
const & s);
165 template <
typename A,
typename B>
166 GLM_FUNC_DECL
explicit tvec3(A
const & s, tref2<B>
const & v);
168 template <
int E0,
int E1,
int E2>
174 template <
int E0,
int E1>
175 GLM_FUNC_DECL tvec3(
glm::detail::swizzle<2, T, tvec2<T>, E0, E1, -1, -2>
const & v, T
const & s)
177 *
this = tvec3<T>(v(), s);
180 template <
int E0,
int E1>
181 GLM_FUNC_DECL tvec3(T
const & s,
glm::detail::swizzle<2, T, tvec2<T>, E0, E1, -1, -2>
const & v)
183 *
this = tvec3<T>(s, v());
189 GLM_FUNC_DECL tvec3<T> & operator= (tvec3<T>
const & v);
190 template <
typename U>
191 GLM_FUNC_DECL tvec3<T> & operator= (tvec3<U>
const & v);
193 template <
typename U>
194 GLM_FUNC_DECL tvec3<T> & operator+=(U
const & s);
195 template <
typename U>
196 GLM_FUNC_DECL tvec3<T> & operator+=(tvec3<U>
const & v);
197 template <
typename U>
198 GLM_FUNC_DECL tvec3<T> & operator-=(U
const & s);
199 template <
typename U>
200 GLM_FUNC_DECL tvec3<T> & operator-=(tvec3<U>
const & v);
201 template <
typename U>
202 GLM_FUNC_DECL tvec3<T> & operator*=(U
const & s);
203 template <
typename U>
204 GLM_FUNC_DECL tvec3<T> & operator*=(tvec3<U>
const & v);
205 template <
typename U>
206 GLM_FUNC_DECL tvec3<T> & operator/=(U
const & s);
207 template <
typename U>
208 GLM_FUNC_DECL tvec3<T> & operator/=(tvec3<U>
const & v);
209 GLM_FUNC_DECL tvec3<T> & operator++();
210 GLM_FUNC_DECL tvec3<T> & operator--();
215 template <
typename U>
216 GLM_FUNC_DECL tvec3<T> & operator%= (U
const & s);
217 template <
typename U>
218 GLM_FUNC_DECL tvec3<T> & operator%= (tvec3<U>
const & v);
219 template <
typename U>
220 GLM_FUNC_DECL tvec3<T> & operator&= (U
const & s);
221 template <
typename U>
222 GLM_FUNC_DECL tvec3<T> & operator&= (tvec3<U>
const & v);
223 template <
typename U>
224 GLM_FUNC_DECL tvec3<T> & operator|= (U
const & s);
225 template <
typename U>
226 GLM_FUNC_DECL tvec3<T> & operator|= (tvec3<U>
const & v);
227 template <
typename U>
228 GLM_FUNC_DECL tvec3<T> & operator^= (U
const & s);
229 template <
typename U>
230 GLM_FUNC_DECL tvec3<T> & operator^= (tvec3<U>
const & v);
231 template <
typename U>
232 GLM_FUNC_DECL tvec3<T> & operator<<=(U
const & s);
233 template <
typename U>
234 GLM_FUNC_DECL tvec3<T> & operator<<=(tvec3<U>
const & v);
235 template <
typename U>
236 GLM_FUNC_DECL tvec3<T> & operator>>=(U
const & s);
237 template <
typename U>
238 GLM_FUNC_DECL tvec3<T> & operator>>=(tvec3<U>
const & v);
243 GLM_FUNC_DECL value_type swizzle(comp X)
const;
244 GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y)
const;
245 GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z)
const;
246 GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W)
const;
247 GLM_FUNC_DECL tref2<T> swizzle(comp X, comp Y);
248 GLM_FUNC_DECL tref3<T> swizzle(comp X, comp Y, comp Z);
251 template <
typename T>
254 GLM_FUNC_DECL tref3(T & x, T & y, T & z);
255 GLM_FUNC_DECL tref3(tref3<T>
const & r);
256 GLM_FUNC_DECL
explicit tref3(tvec3<T>
const & v);
258 GLM_FUNC_DECL tref3<T> & operator= (tref3<T>
const & r);
259 GLM_FUNC_DECL tref3<T> & operator= (tvec3<T>
const & v);
261 GLM_FUNC_DECL tvec3<T> operator() ();
268 GLM_DETAIL_IS_VECTOR(tvec3);
340 #ifndef GLM_EXTERNAL_TEMPLATE 341 #include "type_vec3.inl" 342 #endif//GLM_EXTERNAL_TEMPLATE 344 #endif//glm_core_type_gentype3 detail::tvec3< mediump_int > mediump_ivec3
3 components vector of medium precision signed integer numbers.
Definition: type_vec3.hpp:307
OpenGL Mathematics (glm.g-truc.net)
Definition: _swizzle.hpp:204
Definition: _detail.hpp:38
Definition: type_mat2x2.hpp:38
detail::tvec3< mediump_float > mediump_vec3
3 components vector of medium precision floating-point numbers.
Definition: type_vec3.hpp:286
OpenGL Mathematics (glm.g-truc.net)
detail::tvec3< lowp_int > lowp_ivec3
3 components vector of low precision signed integer numbers.
Definition: type_vec3.hpp:314
detail::tvec3< highp_uint > highp_uvec3
3 components vector of high precision unsigned integer numbers.
Definition: type_vec3.hpp:321
detail::tvec3< highp_int > highp_ivec3
3 components vector of high precision signed integer numbers.
Definition: type_vec3.hpp:300
Definition: type_mat2x2.hpp:39
detail::tvec3< lowp_float > lowp_vec3
3 components vector of low precision floating-point numbers.
Definition: type_vec3.hpp:293
OpenGL Mathematics (glm.g-truc.net)
detail::tvec3< mediump_uint > mediump_uvec3
3 components vector of medium precision unsigned integer numbers.
Definition: type_vec3.hpp:328
OpenGL Mathematics (glm.g-truc.net)
OpenGL Mathematics (glm.g-truc.net)
detail::tvec3< lowp_uint > lowp_uvec3
3 components vector of low precision unsigned integer numbers.
Definition: type_vec3.hpp:335
detail::tvec3< highp_float > highp_vec3
3 components vector of high precision floating-point numbers.
Definition: type_vec3.hpp:279