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_vec1.inl | 558 ++++++++++++++++++++++++++++++ 1 file changed, 558 insertions(+) create mode 100644 external/include/glm/detail/type_vec1.inl (limited to 'external/include/glm/detail/type_vec1.inl') diff --git a/external/include/glm/detail/type_vec1.inl b/external/include/glm/detail/type_vec1.inl new file mode 100644 index 0000000..72f9437 --- /dev/null +++ b/external/include/glm/detail/type_vec1.inl @@ -0,0 +1,558 @@ +/// @ref core +/// @file glm/detail/type_vec1.inl + +namespace glm +{ + // -- Implicit basic constructors -- + +# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec1::tvec1() +# ifndef GLM_FORCE_NO_CTOR_INIT + : x(0) +# endif + {} +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS + +# if !GLM_HAS_DEFAULTED_FUNCTIONS + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec1::tvec1(tvec1 const & v) + : x(v.x) + {} +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec1::tvec1(tvec1 const & v) + : x(v.x) + {} + + // -- Explicit basic constructors -- + + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec1::tvec1(ctor) + {} + + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec1::tvec1(T scalar) + : x(scalar) + {} + + // -- Conversion vector constructors -- + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec1::tvec1(tvec1 const & v) + : x(static_cast(v.x)) + {} + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec1::tvec1(tvec2 const & v) + : x(static_cast(v.x)) + {} + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec1::tvec1(tvec3 const & v) + : x(static_cast(v.x)) + {} + + template + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec1::tvec1(tvec4 const & v) + : x(static_cast(v.x)) + {} + + // -- Component accesses -- + + template + GLM_FUNC_QUALIFIER T & tvec1::operator[](typename tvec1::length_type i) + { + assert(i >= 0 && i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER T const & tvec1::operator[](typename tvec1::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 tvec1 & tvec1::operator=(tvec1 const & v) + { + this->x = v.x; + return *this; + } +# endif//!GLM_HAS_DEFAULTED_FUNCTIONS + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator=(tvec1 const & v) + { + this->x = static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+=(U scalar) + { + this->x += static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+=(tvec1 const & v) + { + this->x += static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-=(U scalar) + { + this->x -= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-=(tvec1 const & v) + { + this->x -= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*=(U scalar) + { + this->x *= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*=(tvec1 const & v) + { + this->x *= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/=(U scalar) + { + this->x /= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/=(tvec1 const & v) + { + this->x /= static_cast(v.x); + return *this; + } + + // -- Increment and decrement operators -- + + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator++() + { + ++this->x; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator--() + { + --this->x; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec1 tvec1::operator++(int) + { + tvec1 Result(*this); + ++*this; + return Result; + } + + template + GLM_FUNC_QUALIFIER tvec1 tvec1::operator--(int) + { + tvec1 Result(*this); + --*this; + return Result; + } + + // -- Unary bit operators -- + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%=(U scalar) + { + this->x %= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%=(tvec1 const & v) + { + this->x %= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&=(U scalar) + { + this->x &= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&=(tvec1 const & v) + { + this->x &= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|=(U scalar) + { + this->x |= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|=(tvec1 const & v) + { + this->x |= U(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^=(U scalar) + { + this->x ^= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^=(tvec1 const & v) + { + this->x ^= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<=(U scalar) + { + this->x <<= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<=(tvec1 const & v) + { + this->x <<= static_cast(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>=(U scalar) + { + this->x >>= static_cast(scalar); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>=(tvec1 const & v) + { + this->x >>= static_cast(v.x); + return *this; + } + + // -- Unary constant operators -- + + template + GLM_FUNC_QUALIFIER tvec1 operator+(tvec1 const & v) + { + return v; + } + + template + GLM_FUNC_QUALIFIER tvec1 operator-(tvec1 const & v) + { + return tvec1( + -v.x); + } + + // -- Binary arithmetic operators -- + + template + GLM_FUNC_QUALIFIER tvec1 operator+(tvec1 const & v, T scalar) + { + return tvec1( + v.x + scalar); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator+(T scalar, tvec1 const & v) + { + return tvec1( + scalar + v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator+(tvec1 const & v1, tvec1 const & v2) + { + return tvec1( + v1.x + v2.x); + } + + //operator- + template + GLM_FUNC_QUALIFIER tvec1 operator-(tvec1 const & v, T scalar) + { + return tvec1( + v.x - scalar); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator-(T scalar, tvec1 const & v) + { + return tvec1( + scalar - v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator-(tvec1 const & v1, tvec1 const & v2) + { + return tvec1( + v1.x - v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator*(tvec1 const & v, T scalar) + { + return tvec1( + v.x * scalar); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator*(T scalar, tvec1 const & v) + { + return tvec1( + scalar * v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator*(tvec1 const & v1, tvec1 const & v2) + { + return tvec1( + v1.x * v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator/(tvec1 const & v, T scalar) + { + return tvec1( + v.x / scalar); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator/(T scalar, tvec1 const & v) + { + return tvec1( + scalar / v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator/(tvec1 const & v1, tvec1 const & v2) + { + return tvec1( + v1.x / v2.x); + } + + // -- Binary bit operators -- + + template + GLM_FUNC_QUALIFIER tvec1 operator%(tvec1 const & v, T scalar) + { + return tvec1( + v.x % scalar); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator%(T scalar, tvec1 const & v) + { + return tvec1( + scalar % v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator%(tvec1 const & v1, tvec1 const & v2) + { + return tvec1( + v1.x % v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator&(tvec1 const & v, T scalar) + { + return tvec1( + v.x & scalar); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator&(T scalar, tvec1 const & v) + { + return tvec1( + scalar & v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator&(tvec1 const & v1, tvec1 const & v2) + { + return tvec1( + v1.x & v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator|(tvec1 const & v, T scalar) + { + return tvec1( + v.x | scalar); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator|(T scalar, tvec1 const & v) + { + return tvec1( + scalar | v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator|(tvec1 const & v1, tvec1 const & v2) + { + return tvec1( + v1.x | v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator^(tvec1 const & v, T scalar) + { + return tvec1( + v.x ^ scalar); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator^(T scalar, tvec1 const & v) + { + return tvec1( + scalar ^ v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator^(tvec1 const & v1, tvec1 const & v2) + { + return tvec1( + v1.x ^ v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator<<(tvec1 const & v, T scalar) + { + return tvec1( + v.x << scalar); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator<<(T scalar, tvec1 const & v) + { + return tvec1( + scalar << v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator<<(tvec1 const & v1, tvec1 const & v2) + { + return tvec1( + v1.x << v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator>>(tvec1 const & v, T scalar) + { + return tvec1( + v.x >> scalar); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator>>(T scalar, tvec1 const & v) + { + return tvec1( + scalar >> v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator>>(tvec1 const & v1, tvec1 const & v2) + { + return tvec1( + v1.x >> v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator~(tvec1 const & v) + { + return tvec1( + ~v.x); + } + + // -- Boolean operators -- + + template + GLM_FUNC_QUALIFIER bool operator==(tvec1 const & v1, tvec1 const & v2) + { + return (v1.x == v2.x); + } + + template + GLM_FUNC_QUALIFIER bool operator!=(tvec1 const & v1, tvec1 const & v2) + { + return (v1.x != v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator&&(tvec1 const & v1, tvec1 const & v2) + { + return tvec1(v1.x && v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator||(tvec1 const & v1, tvec1 const & v2) + { + return tvec1(v1.x || v2.x); + } +}//namespace glm -- cgit v1.2.3