29 #ifndef glm_core_type_gentype1
30 #define glm_core_type_gentype1
41 template <
typename T>
struct tref1;
42 template <
typename T>
struct tref2;
43 template <
typename T>
struct tref3;
44 template <
typename T>
struct tref4;
45 template <
typename T>
struct tvec1;
46 template <
typename T>
struct tvec2;
47 template <
typename T>
struct tvec3;
48 template <
typename T>
struct tvec4;
56 typedef std::size_t size_type;
57 typedef tvec1<T> type;
58 typedef tvec1<bool> bool_type;
60 GLM_FUNC_DECL GLM_CONSTEXPR size_type
length()
const;
65 # if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
67 # else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
68 union {value_type x, r, s;};
69 # endif//GLM_COMPONENT
74 GLM_FUNC_DECL value_type & operator[](size_type i);
75 GLM_FUNC_DECL value_type
const & operator[](size_type i)
const;
80 GLM_FUNC_DECL tvec1();
81 GLM_FUNC_DECL tvec1(tvec1<T>
const & v);
86 GLM_FUNC_DECL
explicit tvec1(
88 GLM_FUNC_DECL
explicit tvec1(
89 value_type
const & s);
94 GLM_FUNC_DECL tvec1(tref1<T>
const & r);
100 template <
typename U>
101 GLM_FUNC_DECL
explicit tvec1(U
const & s);
107 template <
typename U>
108 GLM_FUNC_DECL
explicit tvec1(tvec2<U>
const & v);
110 template <
typename U>
111 GLM_FUNC_DECL
explicit tvec1(tvec3<U>
const & v);
113 template <
typename U>
114 GLM_FUNC_DECL
explicit tvec1(tvec4<U>
const & v);
119 GLM_FUNC_DECL tvec1<T> & operator= (tvec1<T>
const & v);
120 template <
typename U>
121 GLM_FUNC_DECL tvec1<T> & operator= (tvec1<U>
const & v);
123 template <
typename U>
124 GLM_FUNC_DECL tvec1<T> & operator+=(U
const & s);
125 template <
typename U>
126 GLM_FUNC_DECL tvec1<T> & operator+=(tvec1<U>
const & v);
127 template <
typename U>
128 GLM_FUNC_DECL tvec1<T> & operator-=(U
const & s);
129 template <
typename U>
130 GLM_FUNC_DECL tvec1<T> & operator-=(tvec1<U>
const & v);
131 template <
typename U>
132 GLM_FUNC_DECL tvec1<T> & operator*=(U
const & s);
133 template <
typename U>
134 GLM_FUNC_DECL tvec1<T> & operator*=(tvec1<U>
const & v);
135 template <
typename U>
136 GLM_FUNC_DECL tvec1<T> & operator/=(U
const & s);
137 template <
typename U>
138 GLM_FUNC_DECL tvec1<T> & operator/=(tvec1<U>
const & v);
139 GLM_FUNC_DECL tvec1<T> & operator++();
140 GLM_FUNC_DECL tvec1<T> & operator--();
145 template <
typename U>
146 GLM_FUNC_DECL tvec1<T> & operator%=(U
const & s);
147 template <
typename U>
148 GLM_FUNC_DECL tvec1<T> & operator%=(tvec1<U>
const & v);
149 template <
typename U>
150 GLM_FUNC_DECL tvec1<T> & operator&=(U
const & s);
151 template <
typename U>
152 GLM_FUNC_DECL tvec1<T> & operator&=(tvec1<U>
const & v);
153 template <
typename U>
154 GLM_FUNC_DECL tvec1<T> & operator|=(U
const & s);
155 template <
typename U>
156 GLM_FUNC_DECL tvec1<T> & operator|=(tvec1<U>
const & v);
157 template <
typename U>
158 GLM_FUNC_DECL tvec1<T> & operator^=(U
const & s);
159 template <
typename U>
160 GLM_FUNC_DECL tvec1<T> & operator^=(tvec1<U>
const & v);
161 template <
typename U>
162 GLM_FUNC_DECL tvec1<T> & operator<<=(U
const & s);
163 template <
typename U>
164 GLM_FUNC_DECL tvec1<T> & operator<<=(tvec1<U>
const & v);
165 template <
typename U>
166 GLM_FUNC_DECL tvec1<T> & operator>>=(U
const & s);
167 template <
typename U>
168 GLM_FUNC_DECL tvec1<T> & operator>>=(tvec1<U>
const & v);
173 GLM_FUNC_DECL value_type swizzle(comp X)
const;
174 GLM_FUNC_DECL tvec2<T> swizzle(comp X, comp Y)
const;
175 GLM_FUNC_DECL tvec3<T> swizzle(comp X, comp Y, comp Z)
const;
176 GLM_FUNC_DECL tvec4<T> swizzle(comp X, comp Y, comp Z, comp W)
const;
177 GLM_FUNC_DECL tref1<T> swizzle(comp X);
180 template <
typename T>
183 GLM_FUNC_DECL tref1(T & x);
184 GLM_FUNC_DECL tref1(tref1<T>
const & r);
185 GLM_FUNC_DECL tref1(tvec1<T>
const & v);
187 GLM_FUNC_DECL tref1<T> & operator= (tref1<T>
const & r);
188 GLM_FUNC_DECL tref1<T> & operator= (tvec1<T>
const & v);
193 GLM_DETAIL_IS_VECTOR(tvec1);
195 typedef detail::tvec1<highp_float> highp_vec1_t;
196 typedef detail::tvec1<mediump_float> mediump_vec1_t;
197 typedef detail::tvec1<lowp_float> lowp_vec1_t;
198 typedef detail::tvec1<highp_int> highp_ivec1_t;
199 typedef detail::tvec1<mediump_int> mediump_ivec1_t;
200 typedef detail::tvec1<lowp_int> lowp_ivec1_t;
201 typedef detail::tvec1<highp_uint> highp_uvec1_t;
202 typedef detail::tvec1<mediump_uint> mediump_uvec1_t;
203 typedef detail::tvec1<lowp_uint> lowp_uvec1_t;
208 #ifndef GLM_EXTERNAL_TEMPLATE
209 #include "type_vec1.inl"
210 #endif//GLM_EXTERNAL_TEMPLATE
212 #endif//glm_core_type_gentype1