From 6f67371bb1b46579ae837d0e0c61ac1b291be743 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 13 Jan 2018 07:51:33 +0500 Subject: Directory renamed --- external/include/glm/detail/type_vec2.inl | 894 ++++++++++++++++++++++++++++++ 1 file changed, 894 insertions(+) create mode 100644 external/include/glm/detail/type_vec2.inl (limited to 'external/include/glm/detail/type_vec2.inl') diff --git a/external/include/glm/detail/type_vec2.inl b/external/include/glm/detail/type_vec2.inl new file mode 100644 index 0000000..cf79da2 --- /dev/null +++ b/external/include/glm/detail/type_vec2.inl @@ -0,0 +1,894 @@ +/// @ref core +/// @file glm/core/type_tvec2.inl + +namespace glm +{ +# ifdef GLM_STATIC_CONST_MEMBERS + template + const tvec2 tvec2::ZERO(static_cast(0), static_cast(0)); + + template + const tvec2 tvec2::X(static_cast(1), static_cast(0)); + + template + const tvec2 tvec2::Y(static_cast(0), static_cast(1)); + + template + const tvec2 tvec2::XY(static_cast(1), static_cast(1)); +# endif + // -- Implicit basic constructors -- + +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2() +# ifndef GLM_FORCE_NO_CTOR_INIT + : x(0), y(0) +# endif + {} +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS + +# if !GLM_HAS_DEFAULTED_FUNCTIONS + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2(tvec2 const & v) + : x(v.x), y(v.y) + {} +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2(tvec2 const & v) + : x(v.x), y(v.y) + {} + + // -- Explicit basic constructors -- + + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2(ctor) + {} + + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2(T scalar) + : x(scalar), y(scalar) + {} + + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2(T s1, T s2) + : x(s1), y(s2) + {} + + // -- Conversion scalar constructors -- + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2(A a, B b) + : x(static_cast(a)) + , y(static_cast(b)) + {} + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2(tvec1 const & a, tvec1 const & b) + : x(static_cast(a.x)) + , y(static_cast(b.x)) + {} + + // -- Conversion vector constructors -- + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2(tvec2 const & v) + : x(static_cast(v.x)) + , y(static_cast(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2(tvec3 const & v) + : x(static_cast(v.x)) + , y(static_cast(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec2::tvec2(tvec4 const & v) + : x(static_cast(v.x)) + , y(static_cast(v.y)) + {} + + // -- Component accesses -- + + template + GLM_FUNC_QUALIFIER T & tvec2::operator[](typename tvec2::length_type i) + { + assert(i >= 0 && i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER T const & tvec2::operator[](typename tvec2::length_type i) const + { + assert(i >= 0 && i < this->length()); + return (&x)[i]; + } + + // -- Unary arithmetic operators -- + +# if !GLM_HAS_DEFAULTED_FUNCTIONS + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator=(tvec2 const & v) + { + this->x = v.x; + this->y = v.y; + return *this; + } +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator=(tvec2 const & v) + { + this->x = static_cast(v.x); + this->y = static_cast(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+=(U scalar) + { + this->x += static_cast(scalar); + this->y += static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+=(tvec1 const & v) + { + this->x += static_cast(v.x); + this->y += static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+=(tvec2 const & v) + { + this->x += static_cast(v.x); + this->y += static_cast(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-=(U scalar) + { + this->x -= static_cast(scalar); + this->y -= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-=(tvec1 const & v) + { + this->x -= static_cast(v.x); + this->y -= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-=(tvec2 const & v) + { + this->x -= static_cast(v.x); + this->y -= static_cast(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*=(U scalar) + { + this->x *= static_cast(scalar); + this->y *= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*=(tvec1 const & v) + { + this->x *= static_cast(v.x); + this->y *= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*=(tvec2 const & v) + { + this->x *= static_cast(v.x); + this->y *= static_cast(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/=(U scalar) + { + this->x /= static_cast(scalar); + this->y /= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/=(tvec1 const & v) + { + this->x /= static_cast(v.x); + this->y /= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/=(tvec2 const & v) + { + this->x /= static_cast(v.x); + this->y /= static_cast(v.y); + return *this; + } + + // -- Increment and decrement operators -- + + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator++() + { + ++this->x; + ++this->y; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator--() + { + --this->x; + --this->y; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec2 tvec2::operator++(int) + { + tvec2 Result(*this); + ++*this; + return Result; + } + + template + GLM_FUNC_QUALIFIER tvec2 tvec2::operator--(int) + { + tvec2 Result(*this); + --*this; + return Result; + } + + // -- Unary bit operators -- + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%=(U scalar) + { + this->x %= static_cast(scalar); + this->y %= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%=(tvec1 const & v) + { + this->x %= static_cast(v.x); + this->y %= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%=(tvec2 const & v) + { + this->x %= static_cast(v.x); + this->y %= static_cast(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&=(U scalar) + { + this->x &= static_cast(scalar); + this->y &= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&=(tvec1 const & v) + { + this->x &= static_cast(v.x); + this->y &= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&=(tvec2 const & v) + { + this->x &= static_cast(v.x); + this->y &= static_cast(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|=(U scalar) + { + this->x |= static_cast(scalar); + this->y |= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|=(tvec1 const & v) + { + this->x |= static_cast(v.x); + this->y |= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|=(tvec2 const & v) + { + this->x |= static_cast(v.x); + this->y |= static_cast(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^=(U scalar) + { + this->x ^= static_cast(scalar); + this->y ^= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^=(tvec1 const & v) + { + this->x ^= static_cast(v.x); + this->y ^= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^=(tvec2 const & v) + { + this->x ^= static_cast(v.x); + this->y ^= static_cast(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<=(U scalar) + { + this->x <<= static_cast(scalar); + this->y <<= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<=(tvec1 const & v) + { + this->x <<= static_cast(v.x); + this->y <<= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<=(tvec2 const & v) + { + this->x <<= static_cast(v.x); + this->y <<= static_cast(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>=(U scalar) + { + this->x >>= static_cast(scalar); + this->y >>= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>=(tvec1 const & v) + { + this->x >>= static_cast(v.x); + this->y >>= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>=(tvec2 const & v) + { + this->x >>= static_cast(v.x); + this->y >>= static_cast(v.y); + return *this; + } + + // -- Unary arithmetic operators -- + + template + GLM_FUNC_QUALIFIER tvec2 operator+(tvec2 const & v) + { + return v; + } + + template + GLM_FUNC_QUALIFIER tvec2 operator-(tvec2 const & v) + { + return tvec2( + -v.x, + -v.y); + } + + // -- Binary arithmetic operators -- + + template + GLM_FUNC_QUALIFIER tvec2 operator+(tvec2 const & v, T scalar) + { + return tvec2( + v.x + scalar, + v.y + scalar); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator+(tvec2 const & v1, tvec1 const & v2) + { + return tvec2( + v1.x + v2.x, + v1.y + v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator+(T scalar, tvec2 const & v) + { + return tvec2( + scalar + v.x, + scalar + v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator+(tvec1 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x + v2.x, + v1.x + v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator+(tvec2 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x + v2.x, + v1.y + v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator-(tvec2 const & v, T scalar) + { + return tvec2( + v.x - scalar, + v.y - scalar); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator-(tvec2 const & v1, tvec1 const & v2) + { + return tvec2( + v1.x - v2.x, + v1.y - v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator-(T scalar, tvec2 const & v) + { + return tvec2( + scalar - v.x, + scalar - v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator-(tvec1 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x - v2.x, + v1.x - v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator-(tvec2 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x - v2.x, + v1.y - v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator*(tvec2 const & v, T scalar) + { + return tvec2( + v.x * scalar, + v.y * scalar); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator*(tvec2 const & v1, tvec1 const & v2) + { + return tvec2( + v1.x * v2.x, + v1.y * v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator*(T scalar, tvec2 const & v) + { + return tvec2( + scalar * v.x, + scalar * v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator*(tvec1 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x * v2.x, + v1.x * v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator*(tvec2 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x * v2.x, + v1.y * v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator/(tvec2 const & v, T scalar) + { + return tvec2( + v.x / scalar, + v.y / scalar); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator/(tvec2 const & v1, tvec1 const & v2) + { + return tvec2( + v1.x / v2.x, + v1.y / v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator/(T scalar, tvec2 const & v) + { + return tvec2( + scalar / v.x, + scalar / v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator/(tvec1 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x / v2.x, + v1.x / v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator/(tvec2 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x / v2.x, + v1.y / v2.y); + } + + // -- Binary bit operators -- + + template + GLM_FUNC_QUALIFIER tvec2 operator%(tvec2 const & v, T scalar) + { + return tvec2( + v.x % scalar, + v.y % scalar); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator%(tvec2 const & v1, tvec1 const & v2) + { + return tvec2( + v1.x % v2.x, + v1.y % v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator%(T scalar, tvec2 const & v) + { + return tvec2( + scalar % v.x, + scalar % v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator%(tvec1 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x % v2.x, + v1.x % v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator%(tvec2 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x % v2.x, + v1.y % v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator&(tvec2 const & v, T scalar) + { + return tvec2( + v.x & scalar, + v.y & scalar); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator&(tvec2 const & v1, tvec1 const & v2) + { + return tvec2( + v1.x & v2.x, + v1.y & v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator&(T scalar, tvec2 const & v) + { + return tvec2( + scalar & v.x, + scalar & v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator&(tvec1 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x & v2.x, + v1.x & v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator&(tvec2 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x & v2.x, + v1.y & v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator|(tvec2 const & v, T scalar) + { + return tvec2( + v.x | scalar, + v.y | scalar); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator|(tvec2 const & v1, tvec1 const & v2) + { + return tvec2( + v1.x | v2.x, + v1.y | v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator|(T scalar, tvec2 const & v) + { + return tvec2( + scalar | v.x, + scalar | v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator|(tvec1 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x | v2.x, + v1.x | v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator|(tvec2 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x | v2.x, + v1.y | v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^(tvec2 const & v, T scalar) + { + return tvec2( + v.x ^ scalar, + v.y ^ scalar); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^(tvec2 const & v1, tvec1 const & v2) + { + return tvec2( + v1.x ^ v2.x, + v1.y ^ v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^(T scalar, tvec2 const & v) + { + return tvec2( + scalar ^ v.x, + scalar ^ v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^(tvec1 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x ^ v2.x, + v1.x ^ v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^(tvec2 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x ^ v2.x, + v1.y ^ v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<<(tvec2 const & v, T scalar) + { + return tvec2( + v.x << scalar, + v.y << scalar); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<<(tvec2 const & v1, tvec1 const & v2) + { + return tvec2( + v1.x << v2.x, + v1.y << v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<<(T scalar, tvec2 const & v) + { + return tvec2( + scalar << v.x, + scalar << v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<<(tvec1 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x << v2.x, + v1.x << v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<<(tvec2 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x << v2.x, + v1.y << v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>>(tvec2 const & v, T scalar) + { + return tvec2( + v.x >> scalar, + v.y >> scalar); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>>(tvec2 const & v1, tvec1 const & v2) + { + return tvec2( + v1.x >> v2.x, + v1.y >> v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>>(T scalar, tvec2 const & v) + { + return tvec2( + scalar >> v.x, + scalar >> v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>>(tvec1 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x >> v2.x, + v1.x >> v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>>(tvec2 const & v1, tvec2 const & v2) + { + return tvec2( + v1.x >> v2.x, + v1.y >> v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator~(tvec2 const & v) + { + return tvec2( + ~v.x, + ~v.y); + } + + // -- Boolean operators -- + + template + GLM_FUNC_QUALIFIER bool operator==(tvec2 const & v1, tvec2 const & v2) + { + return (v1.x == v2.x) && (v1.y == v2.y); + } + + template + GLM_FUNC_QUALIFIER bool operator!=(tvec2 const & v1, tvec2 const & v2) + { + return (v1.x != v2.x) || (v1.y != v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator&&(tvec2 const & v1, tvec2 const & v2) + { + return tvec2(v1.x && v2.x, v1.y && v2.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator||(tvec2 const & v1, tvec2 const & v2) + { + return tvec2(v1.x || v2.x, v1.y || v2.y); + } +}//namespace glm -- cgit v1.2.3