/////////////////////////////////////////////////////////////////////////////////// /// OpenGL Mathematics (glm.g-truc.net) /// /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentation files (the "Software"), to deal /// in the Software without restriction, including without limitation the rights /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell /// copies of the Software, and to permit persons to whom the Software is /// furnished to do so, subject to the following conditions: /// /// The above copyright notice and this permission notice shall be included in /// all copies or substantial portions of the Software. /// /// Restrictions: /// By making use of the Software for military purposes, you choose to make /// a Bunny unhappy. /// /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN /// THE SOFTWARE. /// /// @ref core /// @file glm/detail/type_tvec4.inl /// @date 2008-08-23 / 2011-06-15 /// @author Christophe Riccio /////////////////////////////////////////////////////////////////////////////////// namespace glm { ////////////////////////////////////// // Implicit basic constructors template GLM_FUNC_QUALIFIER tvec4::tvec4() # ifndef GLM_FORCE_NO_CTOR_INIT : x(0), y(0), z(0), w(0) # endif {} template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec4 const & v) : x(v.x), y(v.y), z(v.z), w(v.w) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec4 const & v) : x(v.x), y(v.y), z(v.z), w(v.w) {} ////////////////////////////////////// // Explicit basic constructors template GLM_FUNC_QUALIFIER tvec4::tvec4(ctor) {} template GLM_FUNC_QUALIFIER tvec4::tvec4(T s) : x(s), y(s), z(s), w(s) {} template GLM_FUNC_QUALIFIER tvec4::tvec4(T a, T b, T c, T d) : x(a), y(b), z(c), w(d) {} ////////////////////////////////////// // Conversion scalar constructors template template GLM_FUNC_QUALIFIER tvec4::tvec4(A a, B b, C c, D d) : x(static_cast(a)), y(static_cast(b)), z(static_cast(c)), w(static_cast(d)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec1 const & a, tvec1 const & b, tvec1 const & c, tvec1 const & d) : x(static_cast(a.x)), y(static_cast(b.x)), z(static_cast(c.x)), w(static_cast(d.x)) {} ////////////////////////////////////// // Conversion vector constructors template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec2 const & a, B b, C c) : x(static_cast(a.x)), y(static_cast(a.y)), z(static_cast(b)), w(static_cast(c)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec2 const & a, tvec1 const & b, tvec1 const & c) : x(static_cast(a.x)), y(static_cast(a.y)), z(static_cast(b.x)), w(static_cast(c.x)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(A s1, tvec2 const & v, C s2) : x(static_cast(s1)), y(static_cast(v.x)), z(static_cast(v.y)), w(static_cast(s2)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec1 const & a, tvec2 const & b, tvec1 const & c) : x(static_cast(a.x)), y(static_cast(b.x)), z(static_cast(b.y)), w(static_cast(c.x)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(A s1, B s2, tvec2 const & v) : x(static_cast(s1)), y(static_cast(s2)), z(static_cast(v.x)), w(static_cast(v.y)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec1 const & a, tvec1 const & b, tvec2 const & c) : x(static_cast(a.x)), y(static_cast(b.x)), z(static_cast(c.x)), w(static_cast(c.y)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec3 const & a, B b) : x(static_cast(a.x)), y(static_cast(a.y)), z(static_cast(a.z)), w(static_cast(b)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec3 const & a, tvec1 const & b) : x(static_cast(a.x)), y(static_cast(a.y)), z(static_cast(a.z)), w(static_cast(b.x)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(A a, tvec3 const & b) : x(static_cast(a)), y(static_cast(b.x)), z(static_cast(b.y)), w(static_cast(b.z)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec1 const & a, tvec3 const & b) : x(static_cast(a.x)), y(static_cast(b.x)), z(static_cast(b.y)), w(static_cast(b.z)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec2 const & a, tvec2 const & b) : x(static_cast(a.x)), y(static_cast(a.y)), z(static_cast(b.x)), w(static_cast(b.y)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4(tvec4 const & v) : x(static_cast(v.x)), y(static_cast(v.y)), z(static_cast(v.z)), w(static_cast(v.w)) {} ////////////////////////////////////// // Component accesses # ifdef GLM_FORCE_SIZE_FUNC template GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4::size_type tvec4::size() const { return 4; } template GLM_FUNC_QUALIFIER T & tvec4::operator[](typename tvec4::size_type i) { assert(i >= 0 && static_cast(i) < detail::component_count(*this)); return (&x)[i]; } template GLM_FUNC_QUALIFIER T const & tvec4::operator[](typename tvec4::size_type i) const { assert(i >= 0 && static_cast(i) < detail::component_count(*this)); return (&x)[i]; } # else template GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4::length_type tvec4::length() const { return 4; } template GLM_FUNC_QUALIFIER T & tvec4::operator[](typename tvec4::length_type i) { assert(i >= 0 && static_cast(i) < detail::component_count(*this)); return (&x)[i]; } template GLM_FUNC_QUALIFIER T const & tvec4::operator[](typename tvec4::length_type i) const { assert(i >= 0 && static_cast(i) < detail::component_count(*this)); return (&x)[i]; } # endif//GLM_FORCE_SIZE_FUNC ////////////////////////////////////// // Unary arithmetic operators template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator=(tvec4 const & v) { this->x = v.x; this->y = v.y; this->z = v.z; this->w = v.w; return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator=(tvec4 const & v) { this->x = static_cast(v.x); this->y = static_cast(v.y); this->z = static_cast(v.z); this->w = static_cast(v.w); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(U scalar) { this->x += static_cast(scalar); this->y += static_cast(scalar); this->z += static_cast(scalar); this->w += static_cast(scalar); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(tvec1 const & v) { T const scalar = static_cast(v.x); this->x += scalar; this->y += scalar; this->z += scalar; this->w += scalar; return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(tvec4 const & v) { this->x += static_cast(v.x); this->y += static_cast(v.y); this->z += static_cast(v.z); this->w += static_cast(v.w); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-=(U scalar) { this->x -= static_cast(scalar); this->y -= static_cast(scalar); this->z -= static_cast(scalar); this->w -= static_cast(scalar); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-=(tvec1 const & v) { T const scalar = static_cast(v.x); this->x -= scalar; this->y -= scalar; this->z -= scalar; this->w -= scalar; return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-=(tvec4 const & v) { this->x -= static_cast(v.x); this->y -= static_cast(v.y); this->z -= static_cast(v.z); this->w -= static_cast(v.w); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator*=(U s) { this->x *= static_cast(s); this->y *= static_cast(s); this->z *= static_cast(s); this->w *= static_cast(s); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator*=(tvec1 const & v) { this->x *= static_cast(v.x); this->y *= static_cast(v.x); this->z *= static_cast(v.x); this->w *= static_cast(v.x); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator*=(tvec4 const & v) { this->x *= static_cast(v.x); this->y *= static_cast(v.y); this->z *= static_cast(v.z); this->w *= static_cast(v.w); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator/=(U s) { this->x /= static_cast(s); this->y /= static_cast(s); this->z /= static_cast(s); this->w /= static_cast(s); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator/=(tvec1 const & v) { this->x /= static_cast(v.x); this->y /= static_cast(v.x); this->z /= static_cast(v.x); this->w /= static_cast(v.x); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator/=(tvec4 const & v) { this->x /= static_cast(v.x); this->y /= static_cast(v.y); this->z /= static_cast(v.z); this->w /= static_cast(v.w); return *this; } ////////////////////////////////////// // Increment and decrement operators template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator++() { ++this->x; ++this->y; ++this->z; ++this->w; return *this; } template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator--() { --this->x; --this->y; --this->z; --this->w; return *this; } template GLM_FUNC_QUALIFIER tvec4 tvec4::operator++(int) { tvec4 Result(*this); ++*this; return Result; } template GLM_FUNC_QUALIFIER tvec4 tvec4::operator--(int) { tvec4 Result(*this); --*this; return Result; } ////////////////////////////////////// // Unary bit operators template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%=(U scalar) { this->x %= static_cast(scalar); this->y %= static_cast(scalar); this->z %= static_cast(scalar); this->w %= static_cast(scalar); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%=(tvec1 const & v) { this->x %= static_cast(v.x); this->y %= static_cast(v.x); this->z %= static_cast(v.x); this->w %= static_cast(v.x); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%=(tvec4 const & v) { this->x %= static_cast(v.x); this->y %= static_cast(v.y); this->z %= static_cast(v.z); this->w %= static_cast(v.w); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&=(U scalar) { this->x &= static_cast(scalar); this->y &= static_cast(scalar); this->z &= static_cast(scalar); this->w &= static_cast(scalar); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&=(tvec1 const & v) { this->x &= static_cast(v.x); this->y &= static_cast(v.x); this->z &= static_cast(v.x); this->w &= static_cast(v.x); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&=(tvec4 const & v) { this->x &= static_cast(v.x); this->y &= static_cast(v.y); this->z &= static_cast(v.z); this->w &= static_cast(v.w); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|=(U scalar) { this->x |= static_cast(scalar); this->y |= static_cast(scalar); this->z |= static_cast(scalar); this->w |= static_cast(scalar); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|=(tvec1 const & v) { this->x |= static_cast(v.x); this->y |= static_cast(v.x); this->z |= static_cast(v.x); this->w |= static_cast(v.x); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|=(tvec4 const & v) { this->x |= static_cast(v.x); this->y |= static_cast(v.y); this->z |= static_cast(v.z); this->w |= static_cast(v.w); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^=(U scalar) { this->x ^= static_cast(scalar); this->y ^= static_cast(scalar); this->z ^= static_cast(scalar); this->w ^= static_cast(scalar); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^=(tvec1 const & v) { this->x ^= static_cast(v.x); this->y ^= static_cast(v.x); this->z ^= static_cast(v.x); this->w ^= static_cast(v.x); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^=(tvec4 const & v) { this->x ^= static_cast(v.x); this->y ^= static_cast(v.y); this->z ^= static_cast(v.z); this->w ^= static_cast(v.w); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<=(U scalar) { this->x <<= static_cast(scalar); this->y <<= static_cast(scalar); this->z <<= static_cast(scalar); this->w <<= static_cast(scalar); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<=(tvec1 const & v) { this->x <<= static_cast(v.x); this->y <<= static_cast(v.x); this->z <<= static_cast(v.x); this->w <<= static_cast(v.x); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<=(tvec4 const & v) { this->x <<= static_cast(v.x); this->y <<= static_cast(v.y); this->z <<= static_cast(v.z); this->w <<= static_cast(v.w); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>=(U scalar) { this->x >>= static_cast(scalar); this->y >>= static_cast(scalar); this->z >>= static_cast(scalar); this->w >>= static_cast(scalar); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>=(tvec1 const & v) { this->x >>= static_cast(v.x); this->y >>= static_cast(v.y); this->z >>= static_cast(v.z); this->w >>= static_cast(v.w); return *this; } template template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>=(tvec4 const & v) { this->x >>= static_cast(v.x); this->y >>= static_cast(v.y); this->z >>= static_cast(v.z); this->w >>= static_cast(v.w); return *this; } ////////////////////////////////////// // Boolean operators template GLM_FUNC_QUALIFIER bool operator==(tvec4 const & v1, tvec4 const & v2) { return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w); } template GLM_FUNC_QUALIFIER bool operator!=(tvec4 const & v1, tvec4 const & v2) { return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w); } ////////////////////////////////////// // Binary arithmetic operators template GLM_FUNC_QUALIFIER tvec4 operator+(tvec4 const & v, T scalar) { return tvec4( v.x + scalar, v.y + scalar, v.z + scalar, v.w + scalar); } template GLM_FUNC_QUALIFIER tvec4 operator+(T scalar, tvec4 const & v) { return tvec4( scalar + v.x, scalar + v.y, scalar + v.z, scalar + v.w); } template GLM_FUNC_QUALIFIER tvec4 operator+(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x + v2.x, v1.y + v2.y, v1.z + v2.z, v1.w + v2.w); } //operator- template GLM_FUNC_QUALIFIER tvec4 operator-(tvec4 const & v, T scalar) { return tvec4( v.x - scalar, v.y - scalar, v.z - scalar, v.w - scalar); } template GLM_FUNC_QUALIFIER tvec4 operator-(T scalar, tvec4 const & v) { return tvec4( scalar - v.x, scalar - v.y, scalar - v.z, scalar - v.w); } template GLM_FUNC_QUALIFIER tvec4 operator-(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x - v2.x, v1.y - v2.y, v1.z - v2.z, v1.w - v2.w); } //operator* template GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v, T scalar) { return tvec4( v.x * scalar, v.y * scalar, v.z * scalar, v.w * scalar); } template GLM_FUNC_QUALIFIER tvec4 operator*(T scalar, tvec4 const & v) { return tvec4( scalar * v.x, scalar * v.y, scalar * v.z, scalar * v.w); } template GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x * v2.x, v1.y * v2.y, v1.z * v2.z, v1.w * v2.w); } //operator/ template GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v, T scalar) { return tvec4( v.x / scalar, v.y / scalar, v.z / scalar, v.w / scalar); } template GLM_FUNC_QUALIFIER tvec4 operator/(T scalar, tvec4 const & v) { return tvec4( scalar / v.x, scalar / v.y, scalar / v.z, scalar / v.w); } template GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x / v2.x, v1.y / v2.y, v1.z / v2.z, v1.w / v2.w); } // Unary constant operators template GLM_FUNC_QUALIFIER tvec4 operator-(tvec4 const & v) { return tvec4( -v.x, -v.y, -v.z, -v.w); } ////////////////////////////////////// // Binary bit operators template GLM_FUNC_QUALIFIER tvec4 operator%(tvec4 const & v, T s) { return tvec4( v.x % s, v.y % s, v.z % s, v.w % s); } template GLM_FUNC_QUALIFIER tvec4 operator%(tvec4 const & v, tvec1 const & s) { return tvec4( v.x % s.x, v.y % s.x, v.z % s.x, v.w % s.x); } template GLM_FUNC_QUALIFIER tvec4 operator%(T s, tvec4 const & v) { return tvec4( s % v.x, s % v.y, s % v.z, s % v.w); } template GLM_FUNC_QUALIFIER tvec4 operator%(tvec1 const & s, tvec4 const & v) { return tvec4( s.x % v.x, s.x % v.y, s.x % v.z, s.x % v.w); } template GLM_FUNC_QUALIFIER tvec4 operator%(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x % v2.x, v1.y % v2.y, v1.z % v2.z, v1.w % v2.w); } template GLM_FUNC_QUALIFIER tvec4 operator&(tvec4 const & v, T s) { return tvec4( v.x & s, v.y & s, v.z & s, v.w & s); } template GLM_FUNC_QUALIFIER tvec4 operator&(tvec4 const & v, tvec1 const & s) { return tvec4( v.x & s.x, v.y & s.x, v.z & s.x, v.w & s.x); } template GLM_FUNC_QUALIFIER tvec4 operator&(T s, tvec4 const & v) { return tvec4( s & v.x, s & v.y, s & v.z, s & v.w); } template GLM_FUNC_QUALIFIER tvec4 operator&(tvec1 const & s, tvec4 const & v) { return tvec4( s.x & v.x, s.x & v.y, s.x & v.z, s.x & v.w); } template GLM_FUNC_QUALIFIER tvec4 operator&(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x & v2.x, v1.y & v2.y, v1.z & v2.z, v1.w & v2.w); } template GLM_FUNC_QUALIFIER tvec4 operator|(tvec4 const & v, T s) { return tvec4( v.x | s, v.y | s, v.z | s, v.w | s); } template GLM_FUNC_QUALIFIER tvec4 operator|(tvec4 const & v, tvec1 const & s) { return tvec4( v.x | s.x, v.y | s.x, v.z | s.x, v.w | s.x); } template GLM_FUNC_QUALIFIER tvec4 operator|(T s, tvec4 const & v) { return tvec4( s | v.x, s | v.y, s | v.z, s | v.w); } template GLM_FUNC_QUALIFIER tvec4 operator|(tvec1 const & s, tvec4 const & v) { return tvec4( s.x | v.x, s.x | v.y, s.x | v.z, s.x | v.w); } template GLM_FUNC_QUALIFIER tvec4 operator|(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x | v2.x, v1.y | v2.y, v1.z | v2.z, v1.w | v2.w); } template GLM_FUNC_QUALIFIER tvec4 operator^(tvec4 const & v, T s) { return tvec4( v.x ^ s, v.y ^ s, v.z ^ s, v.w ^ s); } template GLM_FUNC_QUALIFIER tvec4 operator^(tvec4 const & v, tvec1 const & s) { return tvec4( v.x ^ s.x, v.y ^ s.x, v.z ^ s.x, v.w ^ s.x); } template GLM_FUNC_QUALIFIER tvec4 operator^(T scalar, tvec4 const & v) { return tvec4( scalar ^ v.x, scalar ^ v.y, scalar ^ v.z, scalar ^ v.w); } template GLM_FUNC_QUALIFIER tvec4 operator^(tvec1 const & s, tvec4 const & v) { return tvec4( s.x ^ v.x, s.x ^ v.y, s.x ^ v.z, s.x ^ v.w); } template GLM_FUNC_QUALIFIER tvec4 operator^(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x ^ v2.x, v1.y ^ v2.y, v1.z ^ v2.z, v1.w ^ v2.w); } template GLM_FUNC_QUALIFIER tvec4 operator<<(tvec4 const & v, T scalar) { return tvec4( v.x << scalar, v.y << scalar, v.z << scalar, v.w << scalar); } template GLM_FUNC_QUALIFIER tvec4 operator<<(tvec4 const & v, tvec1 const & s) { return tvec4( v.x << s.x, v.y << s.x, v.z << s.x, v.w << s.x); } template GLM_FUNC_QUALIFIER tvec4 operator<<(T scalar, tvec4 const & v) { return tvec4( scalar << v.x, scalar << v.y, scalar << v.z, scalar << v.w); } template GLM_FUNC_QUALIFIER tvec4 operator<<(tvec1 const & s, tvec4 const & v) { return tvec4( s.x << v.x, s.x << v.y, s.x << v.z, s.x << v.w); } template GLM_FUNC_QUALIFIER tvec4 operator<<(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x << v2.x, v1.y << v2.y, v1.z << v2.z, v1.w << v2.w); } template GLM_FUNC_QUALIFIER tvec4 operator>>(tvec4 const & v, T scalar) { return tvec4( v.x >> scalar, v.y >> scalar, v.z >> scalar, v.w >> scalar); } template GLM_FUNC_QUALIFIER tvec4 operator>>(tvec4 const & v, tvec1 const & s) { return tvec4( v.x >> s.x, v.y >> s.x, v.z >> s.x, v.w >> s.x); } template GLM_FUNC_QUALIFIER tvec4 operator>>(T scalar, tvec4 const & v) { return tvec4( scalar >> v.x, scalar >> v.y, scalar >> v.z, scalar >> v.w); } template GLM_FUNC_QUALIFIER tvec4 operator>>(tvec1 const & s, tvec4 const & v) { return tvec4( s.x >> v.x, s.x >> v.y, s.x >> v.z, s.x >> v.w); } template GLM_FUNC_QUALIFIER tvec4 operator>>(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x >> v2.x, v1.y >> v2.y, v1.z >> v2.z, v1.w >> v2.w); } template GLM_FUNC_QUALIFIER tvec4 operator~(tvec4 const & v) { return tvec4( ~v.x, ~v.y, ~v.z, ~v.w); } }//namespace glm #if GLM_HAS_ANONYMOUS_UNION && GLM_NOT_BUGGY_VC32BITS #if GLM_ARCH & GLM_ARCH_SSE2 # include "type_vec4_sse2.inl" #endif #if GLM_ARCH & GLM_ARCH_AVX # include "type_vec4_avx.inl" #endif #if GLM_ARCH & GLM_ARCH_AVX2 # include "type_vec4_avx2.inl" #endif #endif//