35 #       if GLM_HAS_ANONYMOUS_UNION 
   52 #       if GLM_ARCH & GLM_ARCH_SSE2 
   66                 struct simd<unsigned int>
 
   72 #       if GLM_ARCH & GLM_ARCH_AVX 
   80 #       if GLM_ARCH & GLM_ARCH_AVX2 
   96         template <
typename T, precision P = defaultp>
 
  102                 typedef tvec4<T, P> type;
 
  103                 typedef tvec4<bool, P> bool_type;
 
  104                 typedef T value_type;
 
  105                 typedef int size_type;
 
  110 #               ifdef GLM_FORCE_SIZE_FUNC 
  111                         GLM_FUNC_DECL GLM_CONSTEXPR 
size_t size() 
const;
 
  114                         GLM_FUNC_DECL GLM_CONSTEXPR length_t 
length() 
const;
 
  116 #               endif//GLM_FORCE_SIZE_FUNC 
  121 #               if GLM_HAS_ANONYMOUS_UNION 
  124                                 typename detail::simd<T>::type data;
 
  125                                 struct { T r, g, b, a; };
 
  126                                 struct { T s, t, p, q; };
 
  127                                 struct { T x, y, z, w;};
 
  130                                         _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, x, y, z, w)
 
  131                                         _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, r, g, b, a)
 
  132                                         _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, s, t, p, q)
 
  133                                         _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, x, y, z, w)
 
  134                                         _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, r, g, b, a)
 
  135                                         _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, s, t, p, q)
 
  136                                         _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, x, y, z, w)
 
  137                                         _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, r, g, b, a)
 
  138                                         _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, s, t, p, q)
 
  142                         union { T x, r, s; };
 
  143                         union { T y, g, t; };
 
  144                         union { T z, b, p; };
 
  145                         union { T w, a, q; };
 
  148                                 GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, tvec4, tvec2, tvec3, tvec4)
 
  155                 GLM_FUNC_DECL T & operator[](length_t i);
 
  156                 GLM_FUNC_DECL T 
const & operator[](length_t i) 
const;
 
  161                 GLM_FUNC_DECL tvec4();
 
  162                 template <precision Q>
 
  163                 GLM_FUNC_DECL tvec4(tvec4<T, Q> 
const & v);
 
  168                 GLM_FUNC_DECL 
explicit tvec4(ctor);
 
  169                 GLM_FUNC_DECL 
explicit tvec4(T s);
 
  170                 GLM_FUNC_DECL tvec4(T a, T b, T c, T d);
 
  171                 GLM_FUNC_DECL ~tvec4(){}
 
  177                 template <
typename A, 
typename B, 
typename C, 
typename D>
 
  178                 GLM_FUNC_DECL tvec4(A a, B b, C c, D d);
 
  179                 template <
typename A, 
typename B, 
typename C, 
typename D>
 
  180                 GLM_FUNC_DECL tvec4(tvec1<A, P> 
const & a, tvec1<B, P> 
const & b, tvec1<C, P> 
const & c, tvec1<D, P> 
const & d);
 
  186                 template <
typename A, 
typename B, 
typename C, precision Q>
 
  187                 GLM_FUNC_DECL 
explicit tvec4(tvec2<A, Q> 
const & a, B b, C c);
 
  189                 template <
typename A, 
typename B, 
typename C, precision Q>
 
  190                 GLM_FUNC_DECL 
explicit tvec4(tvec2<A, Q> 
const & a, tvec1<B, Q> 
const & b, tvec1<C, Q> 
const & c);
 
  192                 template <
typename A, 
typename B, 
typename C, precision Q>
 
  193                 GLM_FUNC_DECL 
explicit tvec4(A a, tvec2<B, Q> 
const & b, C c);
 
  195                 template <
typename A, 
typename B, 
typename C, precision Q>
 
  196                 GLM_FUNC_DECL 
explicit tvec4(tvec1<A, Q> 
const & a, tvec2<B, Q> 
const & b, tvec1<C, Q> 
const & c);
 
  198                 template <
typename A, 
typename B, 
typename C, precision Q>
 
  199                 GLM_FUNC_DECL 
explicit tvec4(A a, B b, tvec2<C, Q> 
const & c);
 
  201                 template <
typename A, 
typename B, 
typename C, precision Q>
 
  202                 GLM_FUNC_DECL 
explicit tvec4(tvec1<A, Q> 
const & a, tvec1<B, Q> 
const & b, tvec2<C, Q> 
const & c);
 
  204                 template <
typename A, 
typename B, precision Q>
 
  205                 GLM_FUNC_DECL 
explicit tvec4(tvec3<A, Q> 
const & a, B b);
 
  207                 template <
typename A, 
typename B, precision Q>
 
  208                 GLM_FUNC_DECL 
explicit tvec4(tvec3<A, Q> 
const & a, tvec1<B, Q> 
const & b);
 
  210                 template <
typename A, 
typename B, precision Q>
 
  211                 GLM_FUNC_DECL 
explicit tvec4(A a, tvec3<B, Q> 
const & b);
 
  213                 template <
typename A, 
typename B, precision Q>
 
  214                 GLM_FUNC_DECL 
explicit tvec4(tvec1<A, Q> 
const & a, tvec3<B, Q> 
const & b);
 
  216                 template <
typename A, 
typename B, precision Q>
 
  217                 GLM_FUNC_DECL 
explicit tvec4(tvec2<A, Q> 
const & a, tvec2<B, Q> 
const & b);
 
  219 #               ifdef GLM_FORCE_EXPLICIT_CTOR 
  220                         template <
typename U, precision Q>
 
  222                         GLM_FUNC_DECL 
explicit tvec4(tvec4<U, Q> 
const & v);
 
  224                         template <
typename U, precision Q>
 
  226                         GLM_FUNC_DECL tvec4(tvec4<U, Q> 
const & v);
 
  232 #               if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE) 
  233                         template <
int E0, 
int E1, 
int E2, 
int E3>
 
  234                         GLM_FUNC_DECL tvec4(detail::_swizzle<4, T, P, tvec4<T, P>, E0, E1, E2, E3> 
const & that)
 
  239                         template <
int E0, 
int E1, 
int F0, 
int F1>
 
  240                         GLM_FUNC_DECL tvec4(detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> 
const & v, detail::_swizzle<2, T, P, tvec2<T, P>, F0, F1, -1, -2> 
const & u)
 
  242                                 *
this = tvec4<T, P>(v(), u());
 
  245                         template <
int E0, 
int E1>
 
  246                         GLM_FUNC_DECL tvec4(T 
const & x, T 
const & y, detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> 
const & v)
 
  248                                 *
this = tvec4<T, P>(x, y, v());
 
  251                         template <
int E0, 
int E1>
 
  252                         GLM_FUNC_DECL tvec4(T 
const & x, detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> 
const & v, T 
const & w)
 
  254                                 *
this = tvec4<T, P>(x, v(), w);
 
  257                         template <
int E0, 
int E1>
 
  258                         GLM_FUNC_DECL tvec4(detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> 
const & v, T 
const & z, T 
const & w)
 
  260                                 *
this = tvec4<T, P>(v(), z, w);
 
  263                         template <
int E0, 
int E1, 
int E2>
 
  264                         GLM_FUNC_DECL tvec4(detail::_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> 
const & v, T 
const & w)
 
  266                                 *
this = tvec4<T, P>(v(), w);
 
  269                         template <
int E0, 
int E1, 
int E2>
 
  270                         GLM_FUNC_DECL tvec4(T 
const & x, detail::_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> 
const & v)
 
  272                                 *
this = tvec4<T, P>(x, v());
 
  274 #               endif// GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE) 
  279                 template <
typename U>
 
  280                 GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<U, P> 
const & v);
 
  281                 template <
typename U>
 
  282                 GLM_FUNC_DECL tvec4<T, P> & operator+=(U scalar);
 
  283                 template <
typename U>
 
  284                 GLM_FUNC_DECL tvec4<T, P> & operator+=(tvec1<U, P> 
const & v);
 
  285                 template <
typename U>
 
  286                 GLM_FUNC_DECL tvec4<T, P> & operator+=(tvec4<U, P> 
const & v);
 
  287                 template <
typename U>
 
  288                 GLM_FUNC_DECL tvec4<T, P> & operator-=(U scalar);
 
  289                 template <
typename U>
 
  290                 GLM_FUNC_DECL tvec4<T, P> & operator-=(tvec1<U, P> 
const & v);
 
  291                 template <
typename U>
 
  292                 GLM_FUNC_DECL tvec4<T, P> & operator-=(tvec4<U, P> 
const & v);
 
  293                 template <
typename U>
 
  294                 GLM_FUNC_DECL tvec4<T, P> & operator*=(U scalar);
 
  295                 template <
typename U>
 
  296                 GLM_FUNC_DECL tvec4<T, P> & operator*=(tvec1<U, P> 
const & v);
 
  297                 template <
typename U>
 
  298                 GLM_FUNC_DECL tvec4<T, P> & operator*=(tvec4<U, P> 
const & v);
 
  299                 template <
typename U>
 
  300                 GLM_FUNC_DECL tvec4<T, P> & operator/=(U scalar);
 
  301                 template <
typename U>
 
  302                 GLM_FUNC_DECL tvec4<T, P> & operator/=(tvec1<U, P> 
const & v);
 
  303                 template <
typename U>
 
  304                 GLM_FUNC_DECL tvec4<T, P> & operator/=(tvec4<U, P> 
const & v);
 
  309                 GLM_FUNC_DECL tvec4<T, P> & operator++();
 
  310                 GLM_FUNC_DECL tvec4<T, P> & operator--();
 
  311                 GLM_FUNC_DECL tvec4<T, P> operator++(
int);
 
  312                 GLM_FUNC_DECL tvec4<T, P> operator--(
int);
 
  317                 template <
typename U>
 
  318                 GLM_FUNC_DECL tvec4<T, P> & operator%=(U scalar);
 
  319                 template <
typename U>
 
  320                 GLM_FUNC_DECL tvec4<T, P> & operator%=(tvec1<U, P> 
const & v);
 
  321                 template <
typename U>
 
  322                 GLM_FUNC_DECL tvec4<T, P> & operator%=(tvec4<U, P> 
const & v);
 
  323                 template <
typename U>
 
  324                 GLM_FUNC_DECL tvec4<T, P> & operator&=(U scalar);
 
  325                 template <
typename U>
 
  326                 GLM_FUNC_DECL tvec4<T, P> & operator&=(tvec1<U, P> 
const & v);
 
  327                 template <
typename U>
 
  328                 GLM_FUNC_DECL tvec4<T, P> & operator&=(tvec4<U, P> 
const & v);
 
  329                 template <
typename U>
 
  330                 GLM_FUNC_DECL tvec4<T, P> & operator|=(U scalar);
 
  331                 template <
typename U>
 
  332                 GLM_FUNC_DECL tvec4<T, P> & operator|=(tvec1<U, P> 
const & v);
 
  333                 template <
typename U>
 
  334                 GLM_FUNC_DECL tvec4<T, P> & operator|=(tvec4<U, P> 
const & v);
 
  335                 template <
typename U>
 
  336                 GLM_FUNC_DECL tvec4<T, P> & operator^=(U scalar);
 
  337                 template <
typename U>
 
  338                 GLM_FUNC_DECL tvec4<T, P> & operator^=(tvec1<U, P> 
const & v);
 
  339                 template <
typename U>
 
  340                 GLM_FUNC_DECL tvec4<T, P> & operator^=(tvec4<U, P> 
const & v);
 
  341                 template <
typename U>
 
  342                 GLM_FUNC_DECL tvec4<T, P> & operator<<=(U scalar);
 
  343                 template <
typename U>
 
  344                 GLM_FUNC_DECL tvec4<T, P> & operator<<=(tvec1<U, P> 
const & v);
 
  345                 template <
typename U>
 
  346                 GLM_FUNC_DECL tvec4<T, P> & operator<<=(tvec4<U, P> 
const & v);
 
  347                 template <
typename U>
 
  348                 GLM_FUNC_DECL tvec4<T, P> & operator>>=(U scalar);
 
  349                 template <
typename U>
 
  350                 GLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec1<U, P> 
const & v);
 
  351                 template <
typename U>
 
  352                 GLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec4<U, P> 
const & v);
 
  355         template <
typename T, precision P>
 
  356         GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> 
const & v, T scalar);
 
  358         template <
typename T, precision P>
 
  359         GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> 
const & v, tvec1<T, P> 
const & s);
 
  361         template <
typename T, precision P>
 
  362         GLM_FUNC_DECL tvec4<T, P> operator+(T scalar, tvec4<T, P> 
const & v);
 
  364         template <
typename T, precision P>
 
  365         GLM_FUNC_DECL tvec4<T, P> operator+(tvec1<T, P> 
const & s, tvec4<T, P> 
const & v);
 
  367         template <
typename T, precision P>
 
  368         GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  370         template <
typename T, precision P>
 
  371         GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> 
const & v, T scalar);
 
  373         template <
typename T, precision P>
 
  374         GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> 
const & v, tvec1<T, P> 
const & s);
 
  376         template <
typename T, precision P>
 
  377         GLM_FUNC_DECL tvec4<T, P> operator-(T scalar, tvec4<T, P> 
const & v);
 
  379         template <
typename T, precision P>
 
  380         GLM_FUNC_DECL tvec4<T, P> operator-(tvec1<T, P> 
const & s, tvec4<T, P> 
const & v);
 
  382         template <
typename T, precision P>
 
  383         GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  385         template <
typename T, precision P>
 
  386         GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> 
const & v, T scalar);
 
  388         template <
typename T, precision P>
 
  389         GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> 
const & v, tvec1<T, P> 
const & s);
 
  391         template <
typename T, precision P>
 
  392         GLM_FUNC_DECL tvec4<T, P> operator*(T scalar, tvec4<T, P> 
const & v);
 
  394         template <
typename T, precision P>
 
  395         GLM_FUNC_DECL tvec4<T, P> operator*(tvec1<T, P> 
const & s, tvec4<T, P> 
const & v);
 
  397         template <
typename T, precision P>
 
  398         GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  400         template <
typename T, precision P>
 
  401         GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> 
const & v, T scalar);
 
  403         template <
typename T, precision P>
 
  404         GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> 
const & v, tvec1<T, P> 
const & s);
 
  406         template <
typename T, precision P>
 
  407         GLM_FUNC_DECL tvec4<T, P> operator/(T scalar, tvec4<T, P> 
const & v);
 
  409         template <
typename T, precision P>
 
  410         GLM_FUNC_DECL tvec4<T, P> operator/(tvec1<T, P> 
const & s, tvec4<T, P> 
const & v);
 
  412         template <
typename T, precision P>
 
  413         GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  415         template <
typename T, precision P>
 
  416         GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> 
const & v);
 
  418         template <
typename T, precision P>
 
  419         GLM_FUNC_DECL 
bool operator==(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  421         template <
typename T, precision P>
 
  422         GLM_FUNC_DECL 
bool operator!=(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  424         template <
typename T, precision P>
 
  425         GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> 
const & v, T scalar);
 
  427         template <
typename T, precision P>
 
  428         GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> 
const & v, tvec1<T, P> 
const & s);
 
  430         template <
typename T, precision P>
 
  431         GLM_FUNC_DECL tvec4<T, P> operator%(T scalar, tvec4<T, P> 
const & v);
 
  433         template <
typename T, precision P>
 
  434         GLM_FUNC_DECL tvec4<T, P> operator%(tvec1<T, P> 
const & s, tvec4<T, P> 
const & v);
 
  436         template <
typename T, precision P>
 
  437         GLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  439         template <
typename T, precision P>
 
  440         GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> 
const & v, T scalar);
 
  442         template <
typename T, precision P>
 
  443         GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> 
const & v, tvec1<T, P> 
const & s);
 
  445         template <
typename T, precision P>
 
  446         GLM_FUNC_DECL tvec4<T, P> operator&(T scalar, tvec4<T, P> 
const & v);
 
  448         template <
typename T, precision P>
 
  449         GLM_FUNC_DECL tvec4<T, P> operator&(tvec1<T, P> 
const & s, tvec4<T, P> 
const & v);
 
  451         template <
typename T, precision P>
 
  452         GLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  454         template <
typename T, precision P>
 
  455         GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> 
const & v, T scalar);
 
  457         template <
typename T, precision P>
 
  458         GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> 
const & v, tvec1<T, P> 
const & s);
 
  460         template <
typename T, precision P>
 
  461         GLM_FUNC_DECL tvec4<T, P> operator|(T scalar, tvec4<T, P> 
const & v);
 
  463         template <
typename T, precision P>
 
  464         GLM_FUNC_DECL tvec4<T, P> operator|(tvec1<T, P> 
const & s, tvec4<T, P> 
const & v);
 
  466         template <
typename T, precision P>
 
  467         GLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  469         template <
typename T, precision P>
 
  470         GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> 
const & v, T scalar);
 
  472         template <
typename T, precision P>
 
  473         GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> 
const & v, tvec1<T, P> 
const & s);
 
  475         template <
typename T, precision P>
 
  476         GLM_FUNC_DECL tvec4<T, P> operator^(T scalar, tvec4<T, P> 
const & v);
 
  478         template <
typename T, precision P>
 
  479         GLM_FUNC_DECL tvec4<T, P> operator^(tvec1<T, P> 
const & s, tvec4<T, P> 
const & v);
 
  481         template <
typename T, precision P>
 
  482         GLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  484         template <
typename T, precision P>
 
  485         GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> 
const & v, T scalar);
 
  487         template <
typename T, precision P>
 
  488         GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> 
const & v, tvec1<T, P> 
const & s);
 
  490         template <
typename T, precision P>
 
  491         GLM_FUNC_DECL tvec4<T, P> operator<<(T scalar, tvec4<T, P> 
const & v);
 
  493         template <
typename T, precision P>
 
  494         GLM_FUNC_DECL tvec4<T, P> operator<<(tvec1<T, P> 
const & s, tvec4<T, P> 
const & v);
 
  496         template <
typename T, precision P>
 
  497         GLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  499         template <
typename T, precision P>
 
  500         GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> 
const & v, T scalar);
 
  502         template <
typename T, precision P>
 
  503         GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> 
const & v, tvec1<T, P> 
const & s);
 
  505         template <
typename T, precision P>
 
  506         GLM_FUNC_DECL tvec4<T, P> operator>>(T scalar, tvec4<T, P> 
const & v);
 
  508         template <
typename T, precision P>
 
  509         GLM_FUNC_DECL tvec4<T, P> operator>>(tvec1<T, P> 
const & s, tvec4<T, P> 
const & v);
 
  511         template <
typename T, precision P>
 
  512         GLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> 
const & v1, tvec4<T, P> 
const & v2);
 
  514         template <
typename T, precision P> 
 
  515         GLM_FUNC_DECL tvec4<T, P> operator~(tvec4<T, P> 
const & v);
 
  518 #ifndef GLM_EXTERNAL_TEMPLATE 
  519 #include "type_vec4.inl" 
  520 #endif//GLM_EXTERNAL_TEMPLATE 
GLM_FUNC_DECL T length(vecType< T, P > const &x)
Returns the length of x, i.e., sqrt(x * x). 
OpenGL Mathematics (glm.g-truc.net) 
OpenGL Mathematics (glm.g-truc.net) 
OpenGL Mathematics (glm.g-truc.net) 
OpenGL Mathematics (glm.g-truc.net)