29 #ifndef glm_core_type_gentype4 
   30 #define glm_core_type_gentype4 
   34 #include "type_vec.hpp" 
   36 #       if GLM_HAS_ANONYMOUS_UNION 
   37 #               include "_swizzle.hpp" 
   39 #               include "_swizzle_func.hpp" 
   42 #if(GLM_HAS_INITIALIZER_LISTS) 
   43 #       include <initializer_list> 
   44 #endif //GLM_HAS_INITIALIZER_LISTS 
   50         template <
typename T, precision P>
 
   58                 typedef tvec4<T, P> type;
 
   59                 typedef tvec4<bool, P> bool_type;
 
   61                 typedef int size_type;
 
   66                 GLM_FUNC_DECL GLM_CONSTEXPR length_t 
length() 
const;
 
   71 #               if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)) 
   74                                 struct { T r, g, b, a; };
 
   75                                 struct { T s, t, p, q; };
 
   76                                 struct { T x, y, z, w;};
 
   78                                 _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, x, y, z, w)
 
   79                                 _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, r, g, b, a)
 
   80                                 _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, s, t, p, q)
 
   81                                 _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, x, y, z, w)
 
   82                                 _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, r, g, b, a)
 
   83                                 _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, s, t, p, q)
 
   84                                 _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, x, y, z, w)
 
   85                                 _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, r, g, b, a)
 
   86                                 _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, s, t, p, q)
 
   95                                 GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4)
 
  102                 GLM_FUNC_DECL T & operator[](length_t i);
 
  103                 GLM_FUNC_DECL T 
const & operator[](length_t i) 
const;
 
  108                 GLM_FUNC_DECL tvec4();
 
  109                 GLM_FUNC_DECL tvec4(type 
const & v);
 
  110                 template <precision Q>
 
  111                 GLM_FUNC_DECL tvec4(tvec4<T, Q> 
const & v);
 
  113 #if(GLM_HAS_INITIALIZER_LISTS) 
  114                 template <
typename U>
 
  115                 GLM_FUNC_DECL tvec4(std::initializer_list<U> l);
 
  116 #endif//GLM_HAS_INITIALIZER_LISTS 
  121                 GLM_FUNC_DECL 
explicit tvec4(
 
  123                 GLM_FUNC_DECL 
explicit tvec4(
 
  125                 GLM_FUNC_DECL 
explicit tvec4(
 
  135                 template <
typename A, 
typename B, 
typename C, 
typename D>
 
  136                 GLM_FUNC_DECL 
explicit tvec4(
 
  146                 template <
typename A, 
typename B, 
typename C, precision Q>
 
  147                 GLM_FUNC_DECL 
explicit tvec4(tvec2<A, Q> 
const & v, B 
const & s1, C 
const & s2);
 
  149                 template <
typename A, 
typename B, 
typename C, precision Q>
 
  150                 GLM_FUNC_DECL 
explicit tvec4(A 
const & s1, tvec2<B, Q> 
const & v, C 
const & s2);
 
  152                 template <
typename A, 
typename B, 
typename C, precision Q>
 
  153                 GLM_FUNC_DECL 
explicit tvec4(A 
const & s1, B 
const & s2, tvec2<C, Q> 
const & v);
 
  155                 template <
typename A, 
typename B, precision Q>
 
  156                 GLM_FUNC_DECL 
explicit tvec4(tvec3<A, Q> 
const & v, B 
const & s);
 
  158                 template <
typename A, 
typename B, precision Q>
 
  159                 GLM_FUNC_DECL 
explicit tvec4(A 
const & s, tvec3<B, Q> 
const & v);
 
  161                 template <
typename A, 
typename B, precision Q>
 
  162                 GLM_FUNC_DECL 
explicit tvec4(tvec2<A, Q> 
const & v1, tvec2<B, Q> 
const & v2);
 
  164                 template <
typename U, precision Q>
 
  165                 GLM_FUNC_DECL 
explicit tvec4(tvec4<U, Q> 
const & v);
 
  170 #               if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)) 
  171                 template <
int E0, 
int E1, 
int E2, 
int E3>
 
  172                 GLM_FUNC_DECL tvec4(_swizzle<4, T, P, tvec4<T, P>, E0, E1, E2, E3> 
const & that)
 
  177                 template <
int E0, 
int E1, 
int F0, 
int F1>
 
  178                 GLM_FUNC_DECL tvec4(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> 
const & v, _swizzle<2, T, P, tvec2<T, P>, F0, F1, -1, -2> 
const & u)
 
  180                         *
this = tvec4<T, P>(v(), u());
 
  183                 template <
int E0, 
int E1>
 
  184                 GLM_FUNC_DECL tvec4(T 
const & x, T 
const & y, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> 
const & v)
 
  186                         *
this = tvec4<T, P>(x, y, v());
 
  189                 template <
int E0, 
int E1>
 
  190                 GLM_FUNC_DECL tvec4(T 
const & x, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> 
const & v, T 
const & w)
 
  192                         *
this = tvec4<T, P>(x, v(), w);
 
  195                 template <
int E0, 
int E1>
 
  196                 GLM_FUNC_DECL tvec4(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> 
const & v, T 
const & z, T 
const & w)
 
  198                         *
this = tvec4<T, P>(v(), z, w);
 
  201                 template <
int E0, 
int E1, 
int E2>
 
  202                 GLM_FUNC_DECL tvec4(_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> 
const & v, T 
const & w)
 
  204                         *
this = tvec4<T, P>(v(), w);
 
  207                 template <
int E0, 
int E1, 
int E2>
 
  208                 GLM_FUNC_DECL tvec4(T 
const & x, _swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> 
const & v)
 
  210                         *
this = tvec4<T, P>(x, v());
 
  212 #               endif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)) 
  217                 GLM_FUNC_DECL tvec4<T, P> & operator= (tvec4<T, P> 
const & v);
 
  218                 template <
typename U, precision Q>
 
  219                 GLM_FUNC_DECL tvec4<T, P> & operator= (tvec4<U, Q> 
const & v);
 
  221                 template <
typename U>
 
  222                 GLM_FUNC_DECL tvec4<T, P> & operator+=(U s);
 
  223                 template <
typename U>
 
  224                 GLM_FUNC_DECL tvec4<T, P> & operator+=(tvec4<U, P> 
const & v);
 
  225                 template <
typename U>
 
  226                 GLM_FUNC_DECL tvec4<T, P> & operator-=(U s);
 
  227                 template <
typename U>
 
  228                 GLM_FUNC_DECL tvec4<T, P> & operator-=(tvec4<U, P> 
const & v);
 
  229                 template <
typename U>
 
  230                 GLM_FUNC_DECL tvec4<T, P> & operator*=(U s);
 
  231                 template <
typename U>
 
  232                 GLM_FUNC_DECL tvec4<T, P> & operator*=(tvec4<U, P> 
const & v);
 
  233                 template <
typename U>
 
  234                 GLM_FUNC_DECL tvec4<T, P> & operator/=(U s);
 
  235                 template <
typename U>
 
  236                 GLM_FUNC_DECL tvec4<T, P> & operator/=(tvec4<U, P> 
const & v);
 
  241                 GLM_FUNC_DECL tvec4<T, P> & operator++();
 
  242                 GLM_FUNC_DECL tvec4<T, P> & operator--();
 
  243                 GLM_FUNC_DECL tvec4<T, P> operator++(
int);
 
  244                 GLM_FUNC_DECL tvec4<T, P> operator--(
int);
 
  249                 template <
typename U>
 
  250                 GLM_FUNC_DECL tvec4<T, P> & operator%= (U s);
 
  251                 template <
typename U>
 
  252                 GLM_FUNC_DECL tvec4<T, P> & operator%= (tvec4<U, P> 
const & v);
 
  253                 template <
typename U>
 
  254                 GLM_FUNC_DECL tvec4<T, P> & operator&= (U s);
 
  255                 template <
typename U>
 
  256                 GLM_FUNC_DECL tvec4<T, P> & operator&= (tvec4<U, P> 
const & v);
 
  257                 template <
typename U>
 
  258                 GLM_FUNC_DECL tvec4<T, P> & operator|= (U s);
 
  259                 template <
typename U>
 
  260                 GLM_FUNC_DECL tvec4<T, P> & operator|= (tvec4<U, P> 
const & v);
 
  261                 template <
typename U>
 
  262                 GLM_FUNC_DECL tvec4<T, P> & operator^= (U s);
 
  263                 template <
typename U>
 
  264                 GLM_FUNC_DECL tvec4<T, P> & operator^= (tvec4<U, P> 
const & v);
 
  265                 template <
typename U>
 
  266                 GLM_FUNC_DECL tvec4<T, P> & operator<<=(U s);
 
  267                 template <
typename U>
 
  268                 GLM_FUNC_DECL tvec4<T, P> & operator<<=(tvec4<U, P> 
const & v);
 
  269                 template <
typename U>
 
  270                 GLM_FUNC_DECL tvec4<T, P> & operator>>=(U s);
 
  271                 template <
typename U>
 
  272                 GLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec4<U, P> 
const & v);
 
  275         template <
typename T, precision P>
 
  276         GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> 
const & v, T 
const & s);
 
  278         template <
typename T, precision P>
 
  279         GLM_FUNC_DECL tvec4<T, P> operator+(T 
const & s, tvec4<T, P> 
const & v);
 
  281         template <
typename T, precision P>
 
  282         GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  284         template <
typename T, precision P>
 
  285         GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> 
const & v, T 
const & s);
 
  287         template <
typename T, precision P>
 
  288         GLM_FUNC_DECL tvec4<T, P> operator-(T 
const & s, tvec4<T, P> 
const & v);
 
  290         template <
typename T, precision P>
 
  291         GLM_FUNC_DECL tvec4<T, P> operator-     (tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  293         template <
typename T, precision P>
 
  294         GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> 
const & v, T 
const & s);
 
  296         template <
typename T, precision P>
 
  297         GLM_FUNC_DECL tvec4<T, P> operator*(T 
const & s, tvec4<T, P> 
const & v);
 
  299         template <
typename T, precision P>
 
  300         GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  302         template <
typename T, precision P>
 
  303         GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> 
const & v, T 
const & s);
 
  305         template <
typename T, precision P>
 
  306         GLM_FUNC_DECL tvec4<T, P> operator/(T 
const & s, tvec4<T, P> 
const & v);
 
  308         template <
typename T, precision P>
 
  309         GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  311         template <
typename T, precision P>
 
  312         GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> 
const & v);
 
  314         template <
typename T, precision P>
 
  315         GLM_FUNC_DECL 
bool operator==(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  317         template <
typename T, precision P>
 
  318         GLM_FUNC_DECL 
bool operator!=(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  320         template <
typename T, precision P>
 
  321         GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> 
const & v, T 
const & s);
 
  323         template <
typename T, precision P>
 
  324         GLM_FUNC_DECL tvec4<T, P> operator%(T 
const & s, tvec4<T, P> 
const & v);
 
  326         template <
typename T, precision P>
 
  327         GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  329         template <
typename T, precision P>
 
  330         GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> 
const & v, T 
const & s);
 
  332         template <
typename T, precision P>
 
  333         GLM_FUNC_DECL tvec4<T, P> operator&(T 
const & s, tvec4<T, P> 
const & v);
 
  335         template <
typename T, precision P>
 
  336         GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  338         template <
typename T, precision P>
 
  339         GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> 
const & v, T 
const & s);
 
  341         template <
typename T, precision P>
 
  342         GLM_FUNC_DECL tvec4<T, P> operator|(T 
const & s, tvec4<T, P> 
const & v);
 
  344         template <
typename T, precision P>
 
  345         GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  347         template <
typename T, precision P>
 
  348         GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> 
const & v, T 
const & s);
 
  350         template <
typename T, precision P>
 
  351         GLM_FUNC_DECL tvec4<T, P> operator^(T 
const & s, tvec4<T, P> 
const & v);
 
  353         template <
typename T, precision P>
 
  354         GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  356         template <
typename T, precision P>
 
  357         GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> 
const & v, T 
const & s);
 
  359         template <
typename T, precision P>
 
  360         GLM_FUNC_DECL tvec4<T, P> operator<<(T const & s, tvec4<T, P> 
const & v);
 
  362         template <
typename T, precision P>
 
  363         GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  365         template <
typename T, precision P>
 
  366         GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> 
const & v, T 
const & s);
 
  368         template <
typename T, precision P>
 
  369         GLM_FUNC_DECL tvec4<T, P> operator>>(T 
const & s, tvec4<T, P> 
const & v);
 
  371         template <
typename T, precision P>
 
  372         GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  374         template <
typename T, precision P> 
 
  375         GLM_FUNC_DECL tvec4<T, P> operator~(tvec4<T, P> 
const & v);
 
  380 #ifndef GLM_EXTERNAL_TEMPLATE 
  381 #include "type_vec4.inl" 
  382 #endif//GLM_EXTERNAL_TEMPLATE 
  384 #endif//glm_core_type_gentype4 
GLM_FUNC_DECL genType::value_type length(genType const &x)
Returns the length of x, i.e., sqrt(x * x).