diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index 08aff9b5..d8974644 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -70,10 +70,8 @@ namespace glm template GLM_FUNC_DECL tmat2x2(tmat2x2 const & m); - GLM_FUNC_DECL explicit tmat2x2( - ctor Null); - GLM_FUNC_DECL explicit tmat2x2( - T const & x); + GLM_FUNC_DECL explicit tmat2x2(ctor); + GLM_FUNC_DECL explicit tmat2x2(T const & x); GLM_FUNC_DECL tmat2x2( T const & x1, T const & y1, T const & x2, T const & y2); @@ -144,99 +142,62 @@ namespace glm // Binary operators template - GLM_FUNC_DECL tmat2x2 operator+ ( - tmat2x2 const & m, - T const & s); + GLM_FUNC_DECL tmat2x2 operator+(tmat2x2 const & m, T const & s); template - GLM_FUNC_DECL tmat2x2 operator+ ( - T const & s, - tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 operator+(T const & s, tmat2x2 const & m); template - GLM_FUNC_DECL tmat2x2 operator+ ( - tmat2x2 const & m1, - tmat2x2 const & m2); + GLM_FUNC_DECL tmat2x2 operator+(tmat2x2 const & m1, tmat2x2 const & m2); template - GLM_FUNC_DECL tmat2x2 operator- ( - tmat2x2 const & m, - T const & s); + GLM_FUNC_DECL tmat2x2 operator-(tmat2x2 const & m, T const & s); template - GLM_FUNC_DECL tmat2x2 operator- ( - T const & s, - tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 operator-(T const & s, tmat2x2 const & m); template - GLM_FUNC_DECL tmat2x2 operator- ( - tmat2x2 const & m1, - tmat2x2 const & m2); + GLM_FUNC_DECL tmat2x2 operator-(tmat2x2 const & m1, tmat2x2 const & m2); template - GLM_FUNC_DECL tmat2x2 operator* ( - tmat2x2 const & m, - T const & s); + GLM_FUNC_DECL tmat2x2 operator*(tmat2x2 const & m, T const & s); template - GLM_FUNC_DECL tmat2x2 operator* ( - T const & s, - tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 operator*(T const & s, tmat2x2 const & m); template - GLM_FUNC_DECL typename tmat2x2::col_type operator* ( - tmat2x2 const & m, - typename tmat2x2::row_type const & v); + GLM_FUNC_DECL typename tmat2x2::col_type operator*(tmat2x2 const & m, typename tmat2x2::row_type const & v); template - GLM_FUNC_DECL typename tmat2x2::row_type operator* ( - typename tmat2x2::col_type const & v, - tmat2x2 const & m); + GLM_FUNC_DECL typename tmat2x2::row_type operator*(typename tmat2x2::col_type const & v, tmat2x2 const & m); template - GLM_FUNC_DECL tmat2x2 operator* ( - tmat2x2 const & m1, - tmat2x2 const & m2); + GLM_FUNC_DECL tmat2x2 operator*(tmat2x2 const & m1, tmat2x2 const & m2); template - GLM_FUNC_DECL tmat3x2 operator* ( - tmat2x2 const & m1, - tmat3x2 const & m2); + GLM_FUNC_DECL tmat3x2 operator*(tmat2x2 const & m1, tmat3x2 const & m2); template - GLM_FUNC_DECL tmat4x2 operator* ( - tmat2x2 const & m1, - tmat4x2 const & m2); + GLM_FUNC_DECL tmat4x2 operator*(tmat2x2 const & m1, tmat4x2 const & m2); template - GLM_FUNC_DECL tmat2x2 operator/ ( - tmat2x2 const & m, - T const & s); + GLM_FUNC_DECL tmat2x2 operator/(tmat2x2 const & m, T const & s); template - GLM_FUNC_DECL tmat2x2 operator/ ( - T const & s, - tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 operator/(T const & s, tmat2x2 const & m); template - GLM_FUNC_DECL typename tmat2x2::col_type operator/ ( - tmat2x2 const & m, - typename tmat2x2::row_type const & v); + GLM_FUNC_DECL typename tmat2x2::col_type operator/(tmat2x2 const & m, typename tmat2x2::row_type const & v); template - GLM_FUNC_DECL typename tmat2x2::row_type operator/ ( - typename tmat2x2::col_type const & v, - tmat2x2 const & m); + GLM_FUNC_DECL typename tmat2x2::row_type operator/(typename tmat2x2::col_type const & v, tmat2x2 const & m); template - GLM_FUNC_DECL tmat2x2 operator/ ( - tmat2x2 const & m1, - tmat2x2 const & m2); + GLM_FUNC_DECL tmat2x2 operator/(tmat2x2 const & m1, tmat2x2 const & m2); // Unary constant operators template - GLM_FUNC_DECL tmat2x2 const operator-( - tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 const operator-(tmat2x2 const & m); } //namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index 3a135de8..df56aac6 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -90,10 +90,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x2 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -101,29 +98,21 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2( - tmat2x2 const & m) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x2 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - ctor - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(ctor) {} template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(T const & s) { - value_type const Zero(0); - this->value[0] = col_type(s, Zero); - this->value[1] = col_type(Zero, s); + this->value[0] = col_type(s, 0); + this->value[1] = col_type(0, s); } template @@ -138,11 +127,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - col_type const & v0, - col_type const & v1 - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(col_type const & v0, col_type const & v1) { this->value[0] = v0; this->value[1] = v1; @@ -164,11 +149,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tvec2 const & v1, - tvec2 const & v2 - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tvec2 const & v1, tvec2 const & v2) { this->value[0] = col_type(v1); this->value[1] = col_type(v2); @@ -179,90 +160,63 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x2 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat3x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat4x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tmat4x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -273,7 +227,7 @@ namespace detail // This function shouldn't required but it seems that VC7.1 have an optimisation bug if this operator wasn't declared template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator= (tmat2x2 const & m) + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator=(tmat2x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -282,7 +236,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator= (tmat2x2 const & m) + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator=(tmat2x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -291,7 +245,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator+= (U s) + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator+=(U s) { this->value[0] += s; this->value[1] += s; @@ -300,7 +254,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator+= (tmat2x2 const & m) + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator+=(tmat2x2 const & m) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -309,7 +263,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-= (U s) + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-=(U s) { this->value[0] -= s; this->value[1] -= s; @@ -318,7 +272,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-= (tmat2x2 const & m) + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-=(tmat2x2 const & m) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -327,7 +281,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator*= (U s) + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator*=(U s) { this->value[0] *= s; this->value[1] *= s; @@ -336,14 +290,14 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator*= (tmat2x2 const & m) + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator*=(tmat2x2 const & m) { return (*this = *this * m); } template template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator/= (U s) + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator/=(U s) { this->value[0] /= s; this->value[1] /= s; @@ -352,7 +306,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator/= (tmat2x2 const & m) + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator/=(tmat2x2 const & m) { return (*this = *this * detail::compute_inverse(m)); } @@ -393,11 +347,7 @@ namespace detail // Binary operators template - GLM_FUNC_QUALIFIER tmat2x2 operator+ - ( - tmat2x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x2 operator+(tmat2x2 const & m, T const & s) { return tmat2x2( m[0] + s, @@ -405,11 +355,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2 operator+ - ( - T const & s, - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2 operator+(T const & s, tmat2x2 const & m) { return tmat2x2( m[0] + s, @@ -417,11 +363,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2 operator+ - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x2 operator+(tmat2x2 const & m1, tmat2x2 const & m2) { return tmat2x2( m1[0] + m2[0], @@ -429,11 +371,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2 operator- - ( - tmat2x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x2 operator-(tmat2x2 const & m, T const & s) { return tmat2x2( m[0] - s, @@ -441,11 +379,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2 operator- - ( - T const & s, - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2 operator-(T const & s, tmat2x2 const & m) { return tmat2x2( s - m[0], @@ -453,11 +387,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2 operator- - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x2 operator-(tmat2x2 const & m1, tmat2x2 const & m2) { return tmat2x2( m1[0] - m2[0], @@ -465,11 +395,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2 operator* - ( - tmat2x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x2 operator*(tmat2x2 const & m, T const & s) { return tmat2x2( m[0] * s, @@ -477,11 +403,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2 operator* - ( - T const & s, - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2 operator*(T const & s, tmat2x2 const & m) { return tmat2x2( m[0] * s, @@ -513,11 +435,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2 operator* - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x2 operator*(tmat2x2 const & m1, tmat2x2 const & m2) { return tmat2x2( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -527,11 +445,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x2 operator* - ( - tmat2x2 const & m1, - tmat3x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x2 operator*(tmat2x2 const & m1, tmat3x2 const & m2) { return tmat3x2( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -543,11 +457,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x2 operator* - ( - tmat2x2 const & m1, - tmat4x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x2 operator*(tmat2x2 const & m1, tmat4x2 const & m2) { return tmat4x2( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -561,11 +471,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2 operator/ - ( - tmat2x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x2 operator/(tmat2x2 const & m, T const & s) { return tmat2x2( m[0] / s, @@ -573,11 +479,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x2 operator/ - ( - T const & s, - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2 operator/(T const & s, tmat2x2 const & m) { return tmat2x2( s / m[0], @@ -585,31 +487,19 @@ namespace detail } template - GLM_FUNC_QUALIFIER typename tmat2x2::col_type operator/ - ( - tmat2x2 const & m, - typename tmat2x2::row_type & v - ) + GLM_FUNC_QUALIFIER typename tmat2x2::col_type operator/(tmat2x2 const & m, typename tmat2x2::row_type const & v) { return detail::compute_inverse(m) * v; } template - GLM_FUNC_QUALIFIER typename tmat2x2::row_type operator/ - ( - typename tmat2x2::col_type const & v, - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER typename tmat2x2::row_type operator/(typename tmat2x2::col_type const & v, tmat2x2 const & m) { return v * detail::compute_inverse(m); } template - GLM_FUNC_QUALIFIER tmat2x2 operator/ - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x2 operator/(tmat2x2 const & m1, tmat2x2 const & m2) { tmat2x2 m1_copy(m1); return m1_copy /= m2; @@ -617,10 +507,7 @@ namespace detail // Unary constant operators template - GLM_FUNC_QUALIFIER tmat2x2 const operator- - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x2 const operator-(tmat2x2 const & m) { return tmat2x2( -m[0], @@ -631,21 +518,13 @@ namespace detail // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator==(tmat2x2 const & m1, tmat2x2 const & m2) { return (m1[0] == m2[0]) && (m1[1] == m2[1]); } template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator!=(tmat2x2 const & m1, tmat2x2 const & m2) { return (m1[0] != m2[0]) || (m1[1] != m2[1]); } diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index 7fef267d..fb8695e0 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -54,9 +54,10 @@ namespace glm # endif//GLM_FORCE_SIZE_FUNC private: - // Data + /// @cond DETAIL col_type value[2]; - + /// @endcond + public: // Constructors GLM_FUNC_DECL tmat2x3(); @@ -64,10 +65,8 @@ namespace glm template GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); - GLM_FUNC_DECL explicit tmat2x3( - ctor); - GLM_FUNC_DECL explicit tmat2x3( - T const & s); + GLM_FUNC_DECL explicit tmat2x3(ctor); + GLM_FUNC_DECL explicit tmat2x3(T const & s); GLM_FUNC_DECL tmat2x3( T const & x0, T const & y0, T const & z0, T const & x1, T const & y1, T const & z1); diff --git a/glm/detail/type_mat2x3.inl b/glm/detail/type_mat2x3.inl index ef697645..1ed527b5 100644 --- a/glm/detail/type_mat2x3.inl +++ b/glm/detail/type_mat2x3.inl @@ -46,22 +46,14 @@ namespace glm // Accesses template - GLM_FUNC_QUALIFIER typename tmat2x3::col_type & - tmat2x3::operator[] - ( - length_t i - ) + GLM_FUNC_QUALIFIER typename tmat2x3::col_type & tmat2x3::operator[](length_t i) { assert(i < this->length()); return this->value[i]; } template - GLM_FUNC_QUALIFIER typename tmat2x3::col_type const & - tmat2x3::operator[] - ( - length_t i - ) const + GLM_FUNC_QUALIFIER typename tmat2x3::col_type const & tmat2x3::operator[](length_t i) const { assert(i < this->length()); return this->value[i]; @@ -80,10 +72,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x3 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -91,28 +80,21 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3( - tmat2x3 const & m) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x3 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - ctor - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(ctor) {} template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(T const & s) { - this->value[0] = col_type(s, T(0), T(0)); - this->value[1] = col_type(T(0), s, T(0)); + this->value[0] = col_type(s, 0, 0); + this->value[1] = col_type(0, s, 0); } template @@ -127,11 +109,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - col_type const & v0, - col_type const & v1 - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(col_type const & v0, col_type const & v1) { this->value[0] = v0; this->value[1] = v1; @@ -155,11 +133,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tvec3 const & v1, - tvec3 const & v2 - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tvec3 const & v1, tvec3 const & v2) { this->value[0] = col_type(v1); this->value[1] = col_type(v2); @@ -170,90 +144,63 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x2 const & m) { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat3x2 const & m) { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat4x2 const & m) { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); } template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tmat4x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -263,7 +210,7 @@ namespace glm // Unary updatable operators template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator= (tmat2x3 const & m) + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator=(tmat2x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -272,7 +219,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator= (tmat2x3 const & m) + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator=(tmat2x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -281,7 +228,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator+= (U s) + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator+=(U s) { this->value[0] += s; this->value[1] += s; @@ -290,7 +237,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator+= (tmat2x3 const & m) + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator+=(tmat2x3 const & m) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -299,7 +246,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-= (U s) + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-=(U s) { this->value[0] -= s; this->value[1] -= s; @@ -308,7 +255,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-= (tmat2x3 const & m) + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-=(tmat2x3 const & m) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -317,7 +264,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator*= (U s) + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator*=(U s) { this->value[0] *= s; this->value[1] *= s; @@ -326,7 +273,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator/= (U s) + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator/=(U s) { this->value[0] /= s; this->value[1] /= s; @@ -369,11 +316,7 @@ namespace glm // Binary operators template - GLM_FUNC_QUALIFIER tmat2x3 operator+ - ( - tmat2x3 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x3 operator+(tmat2x3 const & m, T const & s) { return tmat2x3( m[0] + s, @@ -381,11 +324,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3 operator+ - ( - tmat2x3 const & m1, - tmat2x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x3 operator+(tmat2x3 const & m1, tmat2x3 const & m2) { return tmat2x3( m1[0] + m2[0], @@ -393,11 +332,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3 operator- - ( - tmat2x3 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x3 operator-(tmat2x3 const & m, T const & s) { return tmat2x3( m[0] - s, @@ -405,11 +340,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3 operator- - ( - tmat2x3 const & m1, - tmat2x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x3 operator-(tmat2x3 const & m1, tmat2x3 const & m2) { return tmat2x3( m1[0] - m2[0], @@ -417,11 +348,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3 operator* - ( - tmat2x3 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x3 operator*(tmat2x3 const & m, T const & s) { return tmat2x3( m[0] * s, @@ -429,11 +356,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3 operator* - ( - T const & s, - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3 operator*(T const & s, tmat2x3 const & m) { return tmat2x3( m[0] * s, @@ -464,11 +387,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3 operator* - ( - tmat2x3 const & m1, - tmat2x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x3 operator*(tmat2x3 const & m1, tmat2x2 const & m2) { return tmat2x3( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -480,11 +399,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x3 operator* - ( - tmat2x3 const & m1, - tmat3x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x3 operator*(tmat2x3 const & m1, tmat3x2 const & m2) { T SrcA00 = m1[0][0]; T SrcA01 = m1[0][1]; @@ -514,11 +429,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 operator* - ( - tmat2x3 const & m1, - tmat4x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x3 operator*(tmat2x3 const & m1, tmat3x2 const & m2) { return tmat4x3( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -536,11 +447,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3 operator/ - ( - tmat2x3 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x3 operator/(tmat2x3 const & m, T const & s) { return tmat2x3( m[0] / s, @@ -548,11 +455,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3 operator/ - ( - T const & s, - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3 operator/(T const & s, tmat2x3 const & m) { return tmat2x3( s / m[0], @@ -561,10 +464,7 @@ namespace glm // Unary constant operators template - GLM_FUNC_QUALIFIER tmat2x3 const operator- - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x3 const operator-(tmat2x3 const & m) { return tmat2x3( -m[0], @@ -575,21 +475,13 @@ namespace glm // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat2x3 const & m1, - tmat2x3 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator==(tmat2x3 const & m1, tmat2x3 const & m2) { return (m1[0] == m2[0]) && (m1[1] == m2[1]); } template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat2x3 const & m1, - tmat2x3 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator!=(tmat2x3 const & m1, tmat2x3 const & m2) { return (m1[0] != m2[0]) || (m1[1] != m2[1]); } diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index cc320ec0..b6ee9abd 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -54,9 +54,10 @@ namespace glm # endif//GLM_FORCE_SIZE_FUNC private: - // Data + /// @cond DETAIL col_type value[2]; - + /// @endcond + public: // Constructors GLM_FUNC_DECL tmat2x4(); @@ -64,10 +65,8 @@ namespace glm template GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); - GLM_FUNC_DECL explicit tmat2x4( - ctor); - GLM_FUNC_DECL explicit tmat2x4( - T const & s); + GLM_FUNC_DECL explicit tmat2x4(ctor); + GLM_FUNC_DECL explicit tmat2x4(T const & s); GLM_FUNC_DECL tmat2x4( T const & x0, T const & y0, T const & z0, T const & w0, T const & x1, T const & y1, T const & z1, T const & w1); diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index 6a734847..e45ffc0d 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -46,22 +46,14 @@ namespace glm // Accesses template - GLM_FUNC_QUALIFIER typename tmat2x4::col_type & - tmat2x4::operator[] - ( - length_t i - ) + GLM_FUNC_QUALIFIER typename tmat2x4::col_type & tmat2x4::operator[](length_t i) { assert(i < this->length()); return this->value[i]; } template - GLM_FUNC_QUALIFIER typename tmat2x4::col_type const & - tmat2x4::operator[] - ( - length_t i - ) const + GLM_FUNC_QUALIFIER typename tmat2x4::col_type const & tmat2x4::operator[](length_t i) const { assert(i < this->length()); return this->value[i]; @@ -80,10 +72,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x4 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -91,25 +80,18 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4( - tmat2x4 const & m) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x4 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - ctor - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(ctor) {} template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(T const & s) { value_type const Zero(0); this->value[0] = col_type(s, Zero, Zero, Zero); @@ -128,11 +110,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - col_type const & v0, - col_type const & v1 - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(col_type const & v0, col_type const & v1) { this->value[0] = v0; this->value[1] = v1; @@ -156,11 +134,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tvec4 const & v1, - tvec4 const & v2 - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tvec4 const & v1, tvec4 const & v2) { this->value[0] = col_type(v1); this->value[1] = col_type(v2); @@ -171,100 +145,73 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x2 const & m) { - this->value[0] = col_type(m[0], tvec2(0)); - this->value[1] = col_type(m[1], tvec2(0)); + this->value[0] = col_type(m[0], 0, 0); + this->value[1] = col_type(m[1], 0, 0); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat3x3 const & m) { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat2x3 const & m) { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat3x2 const & m) { - this->value[0] = col_type(m[0], tvec2(0)); - this->value[1] = col_type(m[1], tvec2(0)); + this->value[0] = col_type(m[0], 0, 0); + this->value[1] = col_type(m[1], 0, 0); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat3x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat4x2 const & m) { - this->value[0] = col_type(m[0], tvec2(T(0))); - this->value[1] = col_type(m[1], tvec2(T(0))); + this->value[0] = col_type(m[0], 0, 0); + this->value[1] = col_type(m[1], 0, 0); } template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tmat4x3 const & m) { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); } ////////////////////////////////////////////////////////////// // Unary updatable operators template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator= (tmat2x4 const & m) + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator=(tmat2x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -273,7 +220,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator= (tmat2x4 const & m) + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator=(tmat2x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -282,7 +229,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator+= (U s) + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator+=(U s) { this->value[0] += s; this->value[1] += s; @@ -291,7 +238,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator+= (tmat2x4 const & m) + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator+=(tmat2x4 const & m) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -300,7 +247,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-= (U s) + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-=(U s) { this->value[0] -= s; this->value[1] -= s; @@ -309,7 +256,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-= (tmat2x4 const & m) + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-=(tmat2x4 const & m) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -318,7 +265,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator*= (U s) + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator*=(U s) { this->value[0] *= s; this->value[1] *= s; @@ -327,7 +274,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4 & tmat2x4::operator/= (U s) + GLM_FUNC_QUALIFIER tmat2x4 & tmat2x4::operator/=(U s) { this->value[0] /= s; this->value[1] /= s; @@ -370,11 +317,7 @@ namespace glm // Binary operators template - GLM_FUNC_QUALIFIER tmat2x4 operator+ - ( - tmat2x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x4 operator+(tmat2x4 const & m, T const & s) { return tmat2x4( m[0] + s, @@ -382,11 +325,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator+ - ( - tmat2x4 const & m1, - tmat2x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x4 operator+(tmat2x4 const & m1, tmat2x4 const & m2) { return tmat2x4( m1[0] + m2[0], @@ -394,11 +333,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator- - ( - tmat2x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x4 operator-(tmat2x4 const & m, T const & s) { return tmat2x4( m[0] - s, @@ -406,11 +341,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator- - ( - tmat2x4 const & m1, - tmat2x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x4 operator-(tmat2x4 const & m1, tmat2x4 const & m2) { return tmat2x4( m1[0] - m2[0], @@ -418,11 +349,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator* - ( - tmat2x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x4 operator*(tmat2x4 const & m, T const & s) { return tmat2x4( m[0] * s, @@ -430,11 +357,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator* - ( - T const & s, - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4 operator*(T const & s, tmat2x4 const & m) { return tmat2x4( m[0] * s, @@ -442,11 +365,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER typename tmat2x4::col_type operator* - ( - tmat2x4 const & m, - typename tmat2x4::row_type const & v - ) + GLM_FUNC_QUALIFIER typename tmat2x4::col_type operator*(tmat2x4 const & m, typename tmat2x4::row_type const & v) { return typename tmat2x4::col_type( m[0][0] * v.x + m[1][0] * v.y, @@ -456,11 +375,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER typename tmat2x4::row_type operator* - ( - typename tmat2x4::col_type const & v, - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER typename tmat2x4::row_type operator*(typename tmat2x4::col_type const & v, tmat2x4 const & m) { return typename tmat2x4::row_type( v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3], @@ -468,11 +383,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 operator* - ( - tmat2x4 const & m1, - tmat4x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x4 operator*(tmat2x4 const & m1, tmat4x2 const & m2) { T SrcA00 = m1[0][0]; T SrcA01 = m1[0][1]; @@ -513,11 +424,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator* - ( - tmat2x4 const & m1, - tmat2x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x4 operator*(tmat2x4 const & m1, tmat2x2 const & m2) { return tmat2x4( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -531,11 +438,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4 operator* - ( - tmat2x4 const & m1, - tmat3x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x4 operator*(tmat2x4 const & m1, tmat3x2 const & m2) { return tmat3x4( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -553,11 +456,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator/ - ( - tmat2x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat2x4 operator/(tmat2x4 const & m, T const & s) { return tmat2x4( m[0] / s, @@ -565,11 +464,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator/ - ( - T const & s, - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4 operator/(T const & s, tmat2x4 const & m) { return tmat2x4( s / m[0], @@ -578,10 +473,7 @@ namespace glm // Unary constant operators template - GLM_FUNC_QUALIFIER tmat2x4 const operator- - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat2x4 const operator-(tmat2x4 const & m) { return tmat2x4( -m[0], @@ -592,21 +484,13 @@ namespace glm // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat2x4 const & m1, - tmat2x4 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator==(tmat2x4 const & m1, tmat2x4 const & m2) { return (m1[0] == m2[0]) && (m1[1] == m2[1]); } template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat2x4 const & m1, - tmat2x4 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator!=(tmat2x4 const & m1, tmat2x4 const & m2) { return (m1[0] != m2[0]) || (m1[1] != m2[1]); } diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index 462f602f..a9f3199c 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -54,9 +54,10 @@ namespace glm # endif//GLM_FORCE_SIZE_FUNC private: - // Data + /// @cond DETAIL col_type value[3]; - + /// @endcond + public: // Constructors GLM_FUNC_DECL tmat3x2(); @@ -64,10 +65,8 @@ namespace glm template GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); - GLM_FUNC_DECL explicit tmat3x2( - ctor); - GLM_FUNC_DECL explicit tmat3x2( - T const & s); + GLM_FUNC_DECL explicit tmat3x2(ctor); + GLM_FUNC_DECL explicit tmat3x2(T const & s); GLM_FUNC_DECL tmat3x2( T const & x0, T const & y0, T const & x1, T const & y1, diff --git a/glm/detail/type_mat3x2.inl b/glm/detail/type_mat3x2.inl index 4074b78e..026261dd 100644 --- a/glm/detail/type_mat3x2.inl +++ b/glm/detail/type_mat3x2.inl @@ -46,22 +46,14 @@ namespace glm // Accesses template - GLM_FUNC_QUALIFIER typename tmat3x2::col_type & - tmat3x2::operator[] - ( - length_t i - ) + GLM_FUNC_QUALIFIER typename tmat3x2::col_type & tmat3x2::operator[](length_t i) { assert(i < this->length()); return this->value[i]; } template - GLM_FUNC_QUALIFIER typename tmat3x2::col_type const & - tmat3x2::operator[] - ( - length_t i - ) const + GLM_FUNC_QUALIFIER typename tmat3x2::col_type const & tmat3x2::operator[](length_t i) const { assert(i < this->length()); return this->value[i]; @@ -81,10 +73,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x2 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -93,8 +82,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2( - tmat3x2 const & m) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x2 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -102,17 +90,11 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - ctor - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(ctor) {} template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(T const & s) { this->value[0] = col_type(s, 0); this->value[1] = col_type(0, s); @@ -183,10 +165,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x2 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -194,21 +173,15 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat2x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; - this->value[2] = col_type(T(0)); + this->value[2] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -216,10 +189,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -227,10 +197,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat2x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -238,10 +205,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -249,10 +213,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -260,10 +221,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat4x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -271,10 +229,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2(tmat4x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -285,7 +240,7 @@ namespace glm // Unary updatable operators template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator= (tmat3x2 const & m) + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator=(tmat3x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -295,7 +250,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator= (tmat3x2 const & m) + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator=(tmat3x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -305,7 +260,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator+= (U s) + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator+=(U s) { this->value[0] += s; this->value[1] += s; @@ -315,7 +270,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator+= (tmat3x2 const & m) + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator+=(tmat3x2 const & m) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -325,7 +280,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-= (U s) + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-=(U s) { this->value[0] -= s; this->value[1] -= s; @@ -335,7 +290,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-= (tmat3x2 const & m) + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-=(tmat3x2 const & m) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -345,7 +300,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator*= (U s) + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator*=(U s) { this->value[0] *= s; this->value[1] *= s; @@ -355,7 +310,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x2 & tmat3x2::operator/= (U s) + GLM_FUNC_QUALIFIER tmat3x2 & tmat3x2::operator/=(U s) { this->value[0] /= s; this->value[1] /= s; @@ -364,7 +319,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator++ () + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator++() { ++this->value[0]; ++this->value[1]; @@ -373,7 +328,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-- () + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator--() { --this->value[0]; --this->value[1]; @@ -401,11 +356,7 @@ namespace glm // Binary operators template - GLM_FUNC_QUALIFIER tmat3x2 operator+ - ( - tmat3x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x2 operator+(tmat3x2 const & m, T const & s) { return tmat3x2( m[0] + s, @@ -414,11 +365,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2 operator+ - ( - tmat3x2 const & m1, - tmat3x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x2 operator+(tmat3x2 const & m1, tmat3x2 const & m2) { return tmat3x2( m1[0] + m2[0], @@ -427,11 +374,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2 operator- - ( - tmat3x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x2 operator-(tmat3x2 const & m, T const & s) { return tmat3x2( m[0] - s, @@ -440,11 +383,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2 operator- - ( - tmat3x2 const & m1, - tmat3x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x2 operator-(tmat3x2 const & m1, tmat3x2 const & m2) { return tmat3x2( m1[0] - m2[0], @@ -453,11 +392,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2 operator* - ( - tmat3x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x2 operator*(tmat3x2 const & m, T const & s) { return tmat3x2( m[0] * s, @@ -466,11 +401,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2 operator* - ( - T const & s, - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2 operator*(T const & s, tmat3x2 const & m) { return tmat3x2( m[0] * s, @@ -479,10 +410,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER typename tmat3x2::col_type operator* - ( - tmat3x2 const & m, - typename tmat3x2::row_type const & v) + GLM_FUNC_QUALIFIER typename tmat3x2::col_type operator*(tmat3x2 const & m, typename tmat3x2::row_type const & v) { return typename tmat3x2::col_type( m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, @@ -490,10 +418,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER typename tmat3x2::row_type operator* - ( - typename tmat3x2::col_type const & v, - tmat3x2 const & m) + GLM_FUNC_QUALIFIER typename tmat3x2::row_type operator*(typename tmat3x2::col_type const & v, tmat3x2 const & m) { return typename tmat3x2::row_type( v.x * m[0][0] + v.y * m[0][1], @@ -502,11 +427,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x2 operator* - ( - tmat3x2 const & m1, - tmat2x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x2 operator*(tmat3x2 const & m1, tmat2x3 const & m2) { const T SrcA00 = m1[0][0]; const T SrcA01 = m1[0][1]; @@ -531,11 +452,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2 operator* - ( - tmat3x2 const & m1, - tmat3x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x2 operator*(tmat3x2 const & m1, tmat3x3 const & m2) { return tmat3x2( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -547,11 +464,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 operator* - ( - tmat3x2 const & m1, - tmat4x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x2 operator*(tmat3x2 const & m1, tmat4x3 const & m2) { return tmat4x2( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -565,11 +478,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2 operator/ - ( - tmat3x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x2 operator/(tmat3x2 const & m, T const & s) { return tmat3x2( m[0] / s, @@ -578,11 +487,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2 operator/ - ( - T const & s, - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2 operator/(T const & s, tmat3x2 const & m) { return tmat3x2( s / m[0], @@ -592,10 +497,7 @@ namespace glm // Unary constant operators template - GLM_FUNC_QUALIFIER tmat3x2 const operator- - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x2 const operator-(tmat3x2 const & m) { return tmat3x2( -m[0], @@ -607,21 +509,13 @@ namespace glm // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat3x2 const & m1, - tmat3x2 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator==(tmat3x2 const & m1, tmat3x2 const & m2) { return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); } template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat3x2 const & m1, - tmat3x2 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator!=(tmat3x2 const & m1, tmat3x2 const & m2) { return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); } diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index db1fe0cd..f5d6d370 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -61,7 +61,7 @@ namespace glm /// @cond DETAIL col_type value[3]; /// @endcond - + public: // Constructors GLM_FUNC_DECL tmat3x3(); @@ -69,10 +69,8 @@ namespace glm template GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); - GLM_FUNC_DECL explicit tmat3x3( - ctor Null); - GLM_FUNC_DECL explicit tmat3x3( - T const & s); + GLM_FUNC_DECL explicit tmat3x3(ctor); + GLM_FUNC_DECL explicit tmat3x3(T const & s); GLM_FUNC_DECL tmat3x3( T const & x0, T const & y0, T const & z0, T const & x1, T const & y1, T const & z1, diff --git a/glm/detail/type_mat3x3.inl b/glm/detail/type_mat3x3.inl index 2059e56b..f39baa7d 100644 --- a/glm/detail/type_mat3x3.inl +++ b/glm/detail/type_mat3x3.inl @@ -70,22 +70,14 @@ namespace detail // Accesses template - GLM_FUNC_QUALIFIER typename tmat3x3::col_type & - tmat3x3::operator[] - ( - length_t i - ) + GLM_FUNC_QUALIFIER typename tmat3x3::col_type & tmat3x3::operator[](length_t i) { assert(i < this->length()); return this->value[i]; } template - GLM_FUNC_QUALIFIER typename tmat3x3::col_type const & - tmat3x3::operator[] - ( - length_t i - ) const + GLM_FUNC_QUALIFIER typename tmat3x3::col_type const & tmat3x3::operator[](length_t i) const { assert(i < this->length()); return this->value[i]; @@ -105,10 +97,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x3 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -116,16 +105,12 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - ctor - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(ctor) {} template template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3( - tmat3x3 const & m) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x3 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -133,15 +118,11 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(T const & s) { - value_type const Zero(0); - this->value[0] = col_type(s, Zero, Zero); - this->value[1] = col_type(Zero, s, Zero); - this->value[2] = col_type(Zero, Zero, s); + this->value[0] = col_type(s, 0, 0); + this->value[1] = col_type(0, s, 0); + this->value[2] = col_type(0, 0, s); } template @@ -208,10 +189,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -219,21 +197,15 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat2x2 const & m) { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(tvec2(0), value_type(1)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(0, 0, 1); } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -241,54 +213,39 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat2x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; - this->value[2] = col_type(tvec2(0), value_type(1)); + this->value[2] = col_type(0, 0, 1); } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x2 const & m) { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(1)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(m[2], 1); } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(tvec2(0), value_type(1)); + this->value[2] = col_type(0, 0, 1); } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat4x2 const & m) { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(1)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(m[2], 1); } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -296,10 +253,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3(tmat4x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -310,7 +264,7 @@ namespace detail // Operators template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator= (tmat3x3 const & m) + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator=(tmat3x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -320,7 +274,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator= (tmat3x3 const & m) + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator=(tmat3x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -330,7 +284,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator+= (U s) + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator+=(U s) { this->value[0] += s; this->value[1] += s; @@ -340,7 +294,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator+= (tmat3x3 const & m) + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator+=(tmat3x3 const & m) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -350,7 +304,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-= (U s) + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-=(U s) { this->value[0] -= s; this->value[1] -= s; @@ -360,7 +314,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-= (tmat3x3 const & m) + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-=(tmat3x3 const & m) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -370,7 +324,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator*= (U s) + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator*=(U s) { this->value[0] *= s; this->value[1] *= s; @@ -380,14 +334,14 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator*= (tmat3x3 const & m) + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator*=(tmat3x3 const & m) { return (*this = *this * m); } template template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator/= (U s) + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator/=(U s) { this->value[0] /= s; this->value[1] /= s; @@ -397,13 +351,13 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator/= (tmat3x3 const & m) + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator/=(tmat3x3 const & m) { return (*this = *this * detail::compute_inverse(m)); } template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator++ () + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator++() { ++this->value[0]; ++this->value[1]; @@ -440,11 +394,7 @@ namespace detail // Binary operators template - GLM_FUNC_QUALIFIER tmat3x3 operator+ - ( - tmat3x3 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x3 operator+(tmat3x3 const & m, T const & s) { return tmat3x3( m[0] + s, @@ -453,11 +403,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3 operator+ - ( - T const & s, - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3 operator+(T const & s, tmat3x3 const & m) { return tmat3x3( m[0] + s, @@ -466,11 +412,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3 operator+ - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x3 operator+(tmat3x3 const & m1, tmat3x3 const & m2) { return tmat3x3( m1[0] + m2[0], @@ -479,11 +421,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3 operator- - ( - tmat3x3 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x3 operator-(tmat3x3 const & m, T const & s) { return tmat3x3( m[0] - s, @@ -492,11 +430,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3 operator- - ( - T const & s, - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3 operator-(T const & s, tmat3x3 const & m) { return tmat3x3( s - m[0], @@ -505,11 +439,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3 operator- - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x3 operator-(tmat3x3 const & m1, tmat3x3 const & m2) { return tmat3x3( m1[0] - m2[0], @@ -518,11 +448,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3 operator* - ( - tmat3x3 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x3 operator*(tmat3x3 const & m, T const & s) { return tmat3x3( m[0] * s, @@ -531,11 +457,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3 operator* - ( - T const & s, - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3 operator*(T const & s, tmat3x3 const & m) { return tmat3x3( m[0] * s, @@ -544,11 +466,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER typename tmat3x3::col_type operator* - ( - tmat3x3 const & m, - typename tmat3x3::row_type const & v - ) + GLM_FUNC_QUALIFIER typename tmat3x3::col_type operator*(tmat3x3 const & m, typename tmat3x3::row_type const & v) { return typename tmat3x3::col_type( m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, @@ -557,11 +475,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER typename tmat3x3::row_type operator* - ( - typename tmat3x3::col_type const & v, - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER typename tmat3x3::row_type operator*(typename tmat3x3::col_type const & v, tmat3x3 const & m) { return typename tmat3x3::row_type( m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z, @@ -570,11 +484,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3 operator* - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x3 operator*(tmat3x3 const & m1, tmat3x3 const & m2) { T const SrcA00 = m1[0][0]; T const SrcA01 = m1[0][1]; @@ -610,11 +520,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x3 operator* - ( - tmat3x3 const & m1, - tmat2x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x3 operator*(tmat3x3 const & m1, tmat2x3 const & m2) { return tmat2x3( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -626,11 +532,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x3 operator* - ( - tmat3x3 const & m1, - tmat4x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x3 operator*(tmat3x3 const & m1, tmat4x3 const & m2) { return tmat4x3( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -648,11 +550,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3 operator/ - ( - tmat3x3 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x3 operator/(tmat3x3 const & m, T const & s) { return tmat3x3( m[0] / s, @@ -661,11 +559,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x3 operator/ - ( - T const & s, - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3 operator/(T const & s, tmat3x3 const & m) { return tmat3x3( s / m[0], @@ -674,31 +568,19 @@ namespace detail } template - GLM_FUNC_QUALIFIER typename tmat3x3::col_type operator/ - ( - tmat3x3 const & m, - typename tmat3x3::row_type const & v - ) + GLM_FUNC_QUALIFIER typename tmat3x3::col_type operator/(tmat3x3 const & m, typename tmat3x3::row_type const & v) { return detail::compute_inverse(m) * v; } template - GLM_FUNC_QUALIFIER typename tmat3x3::row_type operator/ - ( - typename tmat3x3::col_type const & v, - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER typename tmat3x3::row_type operator/(typename tmat3x3::col_type const & v, tmat3x3 const & m) { return v * detail::compute_inverse(m); } template - GLM_FUNC_QUALIFIER tmat3x3 operator/ - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x3 operator/(tmat3x3 const & m1, tmat3x3 const & m2) { tmat3x3 m1_copy(m1); return m1_copy /= m2; @@ -706,10 +588,7 @@ namespace detail // Unary constant operators template - GLM_FUNC_QUALIFIER tmat3x3 const operator- - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x3 const operator-(tmat3x3 const & m) { return tmat3x3( -m[0], @@ -721,21 +600,13 @@ namespace detail // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator==(tmat3x3 const & m1, tmat3x3 const & m2) { return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); } template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator!=(tmat3x3 const & m1, tmat3x3 const & m2) { return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); } diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index 48f79caf..8cf0fd68 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -54,8 +54,9 @@ namespace glm # endif//GLM_FORCE_SIZE_FUNC private: - // Data + /// @cond DETAIL col_type value[3]; + /// @endcond public: // Constructors @@ -64,10 +65,8 @@ namespace glm template GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); - GLM_FUNC_DECL explicit tmat3x4( - ctor Null); - GLM_FUNC_DECL explicit tmat3x4( - T const & s); + GLM_FUNC_DECL explicit tmat3x4(ctor); + GLM_FUNC_DECL explicit tmat3x4(T const & s); GLM_FUNC_DECL tmat3x4( T const & x0, T const & y0, T const & z0, T const & w0, T const & x1, T const & y1, T const & z1, T const & w1, @@ -111,101 +110,74 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator=(tmat3x4 const & m); template - GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator=(tmat3x4 const & m); template - GLM_FUNC_DECL tmat3x4 & operator+= (U s); + GLM_FUNC_DECL tmat3x4 & operator+=(U s); template - GLM_FUNC_DECL tmat3x4 & operator+= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator+=(tmat3x4 const & m); template - GLM_FUNC_DECL tmat3x4 & operator-= (U s); + GLM_FUNC_DECL tmat3x4 & operator-=(U s); template - GLM_FUNC_DECL tmat3x4 & operator-= (tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 & operator-=(tmat3x4 const & m); template - GLM_FUNC_DECL tmat3x4 & operator*= (U s); + GLM_FUNC_DECL tmat3x4 & operator*=(U s); template - GLM_FUNC_DECL tmat3x4 & operator/= (U s); + GLM_FUNC_DECL tmat3x4 & operator/=(U s); ////////////////////////////////////// // Increment and decrement operators - GLM_FUNC_DECL tmat3x4 & operator++ (); - GLM_FUNC_DECL tmat3x4 & operator-- (); + GLM_FUNC_DECL tmat3x4 & operator++(); + GLM_FUNC_DECL tmat3x4 & operator--(); GLM_FUNC_DECL tmat3x4 operator++(int); GLM_FUNC_DECL tmat3x4 operator--(int); }; // Binary operators template - GLM_FUNC_DECL tmat3x4 operator+ ( - tmat3x4 const & m, - T const & s); + GLM_FUNC_DECL tmat3x4 operator+(tmat3x4 const & m, T const & s); template - GLM_FUNC_DECL tmat3x4 operator+ ( - tmat3x4 const & m1, - tmat3x4 const & m2); + GLM_FUNC_DECL tmat3x4 operator+(tmat3x4 const & m1, tmat3x4 const & m2); template - GLM_FUNC_DECL tmat3x4 operator- ( - tmat3x4 const & m, - T const & s); + GLM_FUNC_DECL tmat3x4 operator-(tmat3x4 const & m, T const & s); template - GLM_FUNC_DECL tmat3x4 operator- ( - tmat3x4 const & m1, - tmat3x4 const & m2); + GLM_FUNC_DECL tmat3x4 operator-(tmat3x4 const & m1, tmat3x4 const & m2); template - GLM_FUNC_DECL tmat3x4 operator* ( - tmat3x4 const & m, - T const & s); + GLM_FUNC_DECL tmat3x4 operator*(tmat3x4 const & m, T const & s); template - GLM_FUNC_DECL tmat3x4 operator* ( - T const & s, - tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 operator*(T const & s, tmat3x4 const & m); template - GLM_FUNC_DECL typename tmat3x4::col_type operator* ( - tmat3x4 const & m, - typename tmat3x4::row_type const & v); + GLM_FUNC_DECL typename tmat3x4::col_type operator*(tmat3x4 const & m, typename tmat3x4::row_type const & v); template - GLM_FUNC_DECL typename tmat3x4::row_type operator* ( - typename tmat3x4::col_type const & v, - tmat3x4 const & m); + GLM_FUNC_DECL typename tmat3x4::row_type operator*(typename tmat3x4::col_type const & v, tmat3x4 const & m); template - GLM_FUNC_DECL tmat4x4 operator* ( - tmat3x4 const & m1, - tmat4x3 const & m2); + GLM_FUNC_DECL tmat4x4 operator*(tmat3x4 const & m1, tmat4x3 const & m2); template - GLM_FUNC_DECL tmat2x4 operator* ( - tmat3x4 const & m1, - tmat2x3 const & m2); + GLM_FUNC_DECL tmat2x4 operator*(tmat3x4 const & m1, tmat2x3 const & m2); template - GLM_FUNC_DECL tmat3x4 operator* ( - tmat3x4 const & m1, - tmat3x3 const & m2); + GLM_FUNC_DECL tmat3x4 operator*(tmat3x4 const & m1, tmat3x3 const & m2); template - GLM_FUNC_DECL tmat3x4 operator/ ( - tmat3x4 const & m, - T const & s); + GLM_FUNC_DECL tmat3x4 operator/(tmat3x4 const & m, T const & s); template - GLM_FUNC_DECL tmat3x4 operator/ ( - T const & s, - tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 operator/(T const & s, tmat3x4 const & m); // Unary constant operators template - GLM_FUNC_DECL tmat3x4 const operator-( - tmat3x4 const & m); + GLM_FUNC_DECL tmat3x4 const operator-(tmat3x4 const & m); }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat3x4.inl b/glm/detail/type_mat3x4.inl index bfbd2923..cb3fdd39 100644 --- a/glm/detail/type_mat3x4.inl +++ b/glm/detail/type_mat3x4.inl @@ -46,22 +46,14 @@ namespace glm // Accesses template - GLM_FUNC_QUALIFIER typename tmat3x4::col_type & - tmat3x4::operator[] - ( - length_t i - ) + GLM_FUNC_QUALIFIER typename tmat3x4::col_type & tmat3x4::operator[](length_t i) { assert(i < this->length()); return this->value[i]; } template - GLM_FUNC_QUALIFIER typename tmat3x4::col_type const & - tmat3x4::operator[] - ( - length_t i - ) const + GLM_FUNC_QUALIFIER typename tmat3x4::col_type const & tmat3x4::operator[](length_t i) const { assert(i < this->length()); return this->value[i]; @@ -81,10 +73,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x4 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -93,8 +82,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4( - tmat3x4 const & m) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x4 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -102,17 +90,11 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - ctor - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(ctor) {} template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(T const & s) { value_type const Zero(0); this->value[0] = col_type(s, Zero, Zero, Zero); @@ -182,10 +164,7 @@ namespace glm // Conversion template template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -193,32 +172,23 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat2x2 const & m) { - this->value[0] = col_type(m[0], tvec2(0)); - this->value[1] = col_type(m[1], tvec2(0)); - this->value[2] = col_type(T(0), T(0), T(1), T(0)); + this->value[0] = col_type(m[0], 0, 0); + this->value[1] = col_type(m[1], 0, 0); + this->value[2] = col_type(0, 0, 1, 0); } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x3 const & m) { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - this->value[2] = col_type(m[2], T(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(m[2], 0); } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -226,65 +196,50 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat2x3 const & m) { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - this->value[2] = col_type(T(0), T(0), T(1), T(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(0, 0, 1, 0); } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat3x2 const & m) { - this->value[0] = col_type(m[0], tvec2(0)); - this->value[1] = col_type(m[1], tvec2(0)); - this->value[2] = col_type(m[2], T(0), T(1)); + this->value[0] = col_type(m[0], 0, 0); + this->value[1] = col_type(m[1], 0, 0); + this->value[2] = col_type(m[2], 0, 1); } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(T(0), T(0), T(1), T(0)); + this->value[2] = col_type(0, 0, 1, 0); } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat4x2 const & m) { - this->value[0] = col_type(m[0], tvec2(T(0))); - this->value[1] = col_type(m[1], tvec2(T(0))); - this->value[2] = col_type(m[2], tvec2(T(1), T(0))); + this->value[0] = col_type(m[0], 0, 0); + this->value[1] = col_type(m[1], 0, 0); + this->value[2] = col_type(m[2], 1, 0); } template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4(tmat4x3 const & m) { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - this->value[2] = col_type(m[2], T(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(m[2], 0); } ////////////////////////////////////////////////////////////// // Unary updatable operators template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator= (tmat3x4 const & m) + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator=(tmat3x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -294,7 +249,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator= (tmat3x4 const & m) + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator=(tmat3x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -304,7 +259,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator+= (U s) + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator+=(U s) { this->value[0] += s; this->value[1] += s; @@ -314,7 +269,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator+= (tmat3x4 const & m) + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator+=(tmat3x4 const & m) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -324,7 +279,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-= (U s) + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-=(U s) { this->value[0] -= s; this->value[1] -= s; @@ -334,7 +289,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-= (tmat3x4 const & m) + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-=(tmat3x4 const & m) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -344,7 +299,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator*= (U s) + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator*=(U s) { this->value[0] *= s; this->value[1] *= s; @@ -354,7 +309,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat3x4 & tmat3x4::operator/= (U s) + GLM_FUNC_QUALIFIER tmat3x4 & tmat3x4::operator/=(U s) { this->value[0] /= s; this->value[1] /= s; @@ -363,7 +318,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator++ () + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator++() { ++this->value[0]; ++this->value[1]; @@ -372,7 +327,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-- () + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator--() { --this->value[0]; --this->value[1]; @@ -400,11 +355,7 @@ namespace glm // Binary operators template - GLM_FUNC_QUALIFIER tmat3x4 operator+ - ( - tmat3x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x4 operator+(tmat3x4 const & m, T const & s) { return tmat3x4( m[0] + s, @@ -413,11 +364,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4 operator+ - ( - tmat3x4 const & m1, - tmat3x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x4 operator+(tmat3x4 const & m1, tmat3x4 const & m2) { return tmat3x4( m1[0] + m2[0], @@ -426,11 +373,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4 operator- - ( - tmat3x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x4 operator-(tmat3x4 const & m, T const & s) { return tmat3x4( m[0] - s, @@ -439,11 +382,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4 operator- - ( - tmat3x4 const & m1, - tmat3x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x4 operator-(tmat3x4 const & m1, tmat3x4 const & m2) { return tmat3x4( m1[0] - m2[0], @@ -452,11 +391,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4 operator* - ( - tmat3x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x4 operator*(tmat3x4 const & m, T const & s) { return tmat3x4( m[0] * s, @@ -465,11 +400,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4 operator* - ( - T const & s, - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4 operator*(T const & s, tmat3x4 const & m) { return tmat3x4( m[0] * s, @@ -505,11 +436,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 operator* - ( - tmat3x4 const & m1, - tmat4x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x4 operator*(tmat3x4 const & m1, tmat4x3 const & m2) { const T SrcA00 = m1[0][0]; const T SrcA01 = m1[0][1]; @@ -558,11 +485,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator* - ( - tmat3x4 const & m1, - tmat2x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x4 operator*(tmat3x4 const & m1, tmat2x3 const & m2) { return tmat2x4( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -576,11 +499,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4 operator* - ( - tmat3x4 const & m1, - tmat3x3 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x4 operator*(tmat3x4 const & m1, tmat3x3 const & m2) { return tmat3x4( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -598,11 +517,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4 operator/ - ( - tmat3x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat3x4 operator/(tmat3x4 const & m, T const & s) { return tmat3x4( m[0] / s, @@ -611,11 +526,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x4 operator/ - ( - T const & s, - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4 operator/(T const & s, tmat3x4 const & m) { return tmat3x4( s / m[0], @@ -625,10 +536,7 @@ namespace glm // Unary constant operators template - GLM_FUNC_QUALIFIER tmat3x4 const operator- - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat3x4 const operator-(tmat3x4 const & m) { return tmat3x4( -m[0], @@ -640,21 +548,13 @@ namespace glm // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat3x4 const & m1, - tmat3x4 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator==(tmat3x4 const & m1, tmat3x4 const & m2) { return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); } template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat3x4 const & m1, - tmat3x4 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator!=(tmat3x4 const & m1, tmat3x4 const & m2) { return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); } diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index b67009d0..6247cda9 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -54,8 +54,9 @@ namespace glm # endif//GLM_FORCE_SIZE_FUNC private: - // Data + /// @cond DETAIL col_type value[4]; + /// @endcond public: // Constructors @@ -64,10 +65,8 @@ namespace glm template GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); - GLM_FUNC_DECL explicit tmat4x2( - ctor Null); - GLM_FUNC_DECL explicit tmat4x2( - T const & x); + GLM_FUNC_DECL explicit tmat4x2(ctor); + GLM_FUNC_DECL explicit tmat4x2(T const & x); GLM_FUNC_DECL tmat4x2( T const & x0, T const & y0, T const & x1, T const & y1, @@ -82,7 +81,7 @@ namespace glm ////////////////////////////////////// // Conversions - template< + template < typename X1, typename Y1, typename X2, typename Y2, typename X3, typename Y3, @@ -117,21 +116,21 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator=(tmat4x2 const & m); template - GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator=(tmat4x2 const & m); template - GLM_FUNC_DECL tmat4x2& operator+= (U s); + GLM_FUNC_DECL tmat4x2& operator+=(U s); template - GLM_FUNC_DECL tmat4x2& operator+= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator+=(tmat4x2 const & m); template - GLM_FUNC_DECL tmat4x2& operator-= (U s); + GLM_FUNC_DECL tmat4x2& operator-=(U s); template - GLM_FUNC_DECL tmat4x2& operator-= (tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2& operator-=(tmat4x2 const & m); template - GLM_FUNC_DECL tmat4x2& operator*= (U s); + GLM_FUNC_DECL tmat4x2& operator*=(U s); template - GLM_FUNC_DECL tmat4x2& operator/= (U s); + GLM_FUNC_DECL tmat4x2& operator/=(U s); ////////////////////////////////////// // Increment and decrement operators @@ -144,74 +143,47 @@ namespace glm // Binary operators template - GLM_FUNC_DECL tmat4x2 operator+ ( - tmat4x2 const & m, - T const & s); + GLM_FUNC_DECL tmat4x2 operator+(tmat4x2 const & m, T const & s); template - GLM_FUNC_DECL tmat4x2 operator+ ( - tmat4x2 const & m1, - tmat4x2 const & m2); + GLM_FUNC_DECL tmat4x2 operator+(tmat4x2 const & m1, tmat4x2 const & m2); template - GLM_FUNC_DECL tmat4x2 operator- ( - tmat4x2 const & m, - T const & s); + GLM_FUNC_DECL tmat4x2 operator-(tmat4x2 const & m, T const & s); template - GLM_FUNC_DECL tmat4x2 operator- ( - tmat4x2 const & m1, - tmat4x2 const & m2); + GLM_FUNC_DECL tmat4x2 operator-(tmat4x2 const & m1, tmat4x2 const & m2); template - GLM_FUNC_DECL tmat4x2 operator* ( - tmat4x2 const & m, - T const & s); + GLM_FUNC_DECL tmat4x2 operator*(tmat4x2 const & m, T const & s); template - GLM_FUNC_DECL tmat4x2 operator* ( - T const & s, - tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2 operator*(T const & s, tmat4x2 const & m); template - GLM_FUNC_DECL typename tmat4x2::col_type operator* ( - tmat4x2 const & m, - typename tmat4x2::row_type const & v); + GLM_FUNC_DECL typename tmat4x2::col_type operator*(tmat4x2 const & m, typename tmat4x2::row_type const & v); template - GLM_FUNC_DECL typename tmat4x2::row_type operator* ( - typename tmat4x2::col_type const & v, - tmat4x2 const & m); + GLM_FUNC_DECL typename tmat4x2::row_type operator*(typename tmat4x2::col_type const & v, tmat4x2 const & m); template - GLM_FUNC_DECL tmat3x2 operator* ( - tmat4x2 const & m1, - tmat3x4 const & m2); + GLM_FUNC_DECL tmat3x2 operator*(tmat4x2 const & m1, tmat3x4 const & m2); template - GLM_FUNC_DECL tmat4x2 operator* ( - tmat4x2 const & m1, - tmat4x4 const & m2); + GLM_FUNC_DECL tmat4x2 operator*(tmat4x2 const & m1, tmat4x4 const & m2); template - GLM_FUNC_DECL tmat2x3 operator* ( - tmat4x3 const & m1, - tmat2x4 const & m2); + GLM_FUNC_DECL tmat2x3 operator*(tmat4x3 const & m1, tmat2x4 const & m2); template - GLM_FUNC_DECL tmat4x2 operator/ ( - tmat4x2 const & m, - T const & s); + GLM_FUNC_DECL tmat4x2 operator/(tmat4x2 const & m, T const & s); template - GLM_FUNC_DECL tmat4x2 operator/ ( - T const & s, - tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2 operator/(T const & s, tmat4x2 const & m); // Unary constant operators template - GLM_FUNC_DECL tmat4x2 const operator-( - tmat4x2 const & m); + GLM_FUNC_DECL tmat4x2 const operator-(tmat4x2 const & m); }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat4x2.inl b/glm/detail/type_mat4x2.inl index c790ee07..3090a8bd 100644 --- a/glm/detail/type_mat4x2.inl +++ b/glm/detail/type_mat4x2.inl @@ -46,22 +46,14 @@ namespace glm // Accesses template - GLM_FUNC_QUALIFIER typename tmat4x2::col_type & - tmat4x2::operator[] - ( - length_t i - ) + GLM_FUNC_QUALIFIER typename tmat4x2::col_type & tmat4x2::operator[](length_t i) { assert(i < this->length()); return this->value[i]; } template - GLM_FUNC_QUALIFIER typename tmat4x2::col_type const & - tmat4x2::operator[] - ( - length_t i - ) const + GLM_FUNC_QUALIFIER typename tmat4x2::col_type const & tmat4x2::operator[](length_t i) const { assert(i < this->length()); return this->value[i]; @@ -82,8 +74,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2( - tmat4x2 const & m) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x2 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -93,8 +84,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2( - tmat4x2 const & m) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x2 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -107,10 +97,7 @@ namespace glm {} template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(T const & s) { value_type const Zero(0); this->value[0] = col_type(s, Zero); @@ -192,10 +179,7 @@ namespace glm // Conversion template template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x2 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -204,34 +188,25 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat2x2 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(static_cast(0)); - this->value[3] = col_type(static_cast(0)); + this->value[2] = col_type(0); + this->value[3] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); this->value[2] = col_type(m[2]); - this->value[3] = col_type(static_cast(0)); + this->value[3] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -240,46 +215,34 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat2x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(static_cast(0)); - this->value[3] = col_type(static_cast(0)); + this->value[2] = col_type(0); + this->value[3] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat3x2 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); this->value[2] = col_type(m[2]); - this->value[3] = col_type(static_cast(0)); + this->value[3] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(static_cast(0)); - this->value[3] = col_type(static_cast(0)); + this->value[2] = col_type(0); + this->value[3] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat4x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -288,25 +251,19 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); this->value[2] = col_type(m[2]); - this->value[3] = col_type(static_cast(0)); + this->value[3] = col_type(0); } ////////////////////////////////////////////////////////////// // Unary updatable operators template - GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator= - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator=(tmat4x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -317,10 +274,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator= - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator=(tmat4x2 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -331,7 +285,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator+= (U s) + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator+=(U s) { this->value[0] += s; this->value[1] += s; @@ -342,7 +296,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator+= (tmat4x2 const & m) + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator+=(tmat4x2 const & m) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -353,7 +307,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-= (U s) + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-=(U s) { this->value[0] -= s; this->value[1] -= s; @@ -364,7 +318,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-= (tmat4x2 const & m) + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-=(tmat4x2 const & m) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -375,7 +329,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator*= (U s) + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator*=(U s) { this->value[0] *= s; this->value[1] *= s; @@ -386,7 +340,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator/= (U s) + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator/=(U s) { this->value[0] /= s; this->value[1] /= s; @@ -396,7 +350,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator++ () + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator++() { ++this->value[0]; ++this->value[1]; @@ -406,7 +360,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-- () + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator--() { --this->value[0]; --this->value[1]; @@ -435,11 +389,7 @@ namespace glm // Binary operators template - GLM_FUNC_QUALIFIER tmat4x2 operator+ - ( - tmat4x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x2 operator+(tmat4x2 const & m, T const & s) { return tmat4x2( m[0] + s, @@ -449,11 +399,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 operator+ - ( - tmat4x2 const & m1, - tmat4x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x2 operator+(tmat4x2 const & m1, tmat4x2 const & m2) { return tmat4x2( m1[0] + m2[0], @@ -463,11 +409,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 operator- - ( - tmat4x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x2 operator-(tmat4x2 const & m, T const & s) { return tmat4x2( m[0] - s, @@ -477,11 +419,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 operator- - ( - tmat4x2 const & m1, - tmat4x2 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x2 operator-(tmat4x2 const & m1, tmat4x2 const & m2) { return tmat4x2( m1[0] - m2[0], @@ -491,11 +429,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 operator* - ( - tmat4x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x2 operator*(tmat4x2 const & m, T const & s) { return tmat4x2( m[0] * s, @@ -505,11 +439,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 operator* - ( - T const & s, - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2 operator*(T const & s, tmat4x2 const & m) { return tmat4x2( m[0] * s, @@ -519,11 +449,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER typename tmat4x2::col_type operator* - ( - tmat4x2 const & m, - typename tmat4x2::row_type const & v - ) + GLM_FUNC_QUALIFIER typename tmat4x2::col_type operator*(tmat4x2 const & m, typename tmat4x2::row_type const & v) { return typename tmat4x2::col_type( m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, @@ -531,11 +457,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER typename tmat4x2::row_type operator* - ( - typename tmat4x2::col_type const & v, - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER typename tmat4x2::row_type operator*(typename tmat4x2::col_type const & v, tmat4x2 const & m) { return typename tmat4x2::row_type( v.x * m[0][0] + v.y * m[0][1], @@ -545,11 +467,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x2 operator* - ( - tmat4x2 const & m1, - tmat2x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x2 operator*(tmat4x2 const & m1, tmat2x4 const & m2) { T const SrcA00 = m1[0][0]; T const SrcA01 = m1[0][1]; @@ -578,11 +496,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x2 operator* - ( - tmat4x2 const & m1, - tmat3x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x2 operator*(tmat4x2 const & m1, tmat3x4 const & m2) { return tmat3x2( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -594,11 +508,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 operator* - ( - tmat4x2 const & m1, - tmat4x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x2 operator*(tmat4x2 const & m1, tmat4x4 const & m2) { return tmat4x2( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -612,11 +522,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 operator/ - ( - tmat4x2 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x2 operator/(tmat4x2 const & m, T const & s) { return tmat4x2( m[0] / s, @@ -626,11 +532,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x2 operator/ - ( - T const & s, - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2 operator/(T const & s, tmat4x2 const & m) { return tmat4x2( s / m[0], @@ -641,10 +543,7 @@ namespace glm // Unary constant operators template - GLM_FUNC_QUALIFIER tmat4x2 const operator- - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x2 const operator-(tmat4x2 const & m) { return tmat4x2( -m[0], @@ -657,21 +556,13 @@ namespace glm // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat4x2 const & m1, - tmat4x2 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator==(tmat4x2 const & m1, tmat4x2 const & m2) { return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); } template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat4x2 const & m1, - tmat4x2 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator!=(tmat4x2 const & m1, tmat4x2 const & m2) { return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); } diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index 9f09035e..12a47c63 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -64,10 +64,8 @@ namespace glm template GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); - GLM_FUNC_DECL explicit tmat4x3( - ctor Null); - GLM_FUNC_DECL explicit tmat4x3( - T const & x); + GLM_FUNC_DECL explicit tmat4x3(ctor); + GLM_FUNC_DECL explicit tmat4x3(T const & x); GLM_FUNC_DECL tmat4x3( T const & x0, T const & y0, T const & z0, T const & x1, T const & y1, T const & z1, @@ -117,101 +115,74 @@ namespace glm GLM_FUNC_DECL col_type & operator[](size_type i); GLM_FUNC_DECL col_type const & operator[](size_type i) const; - GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator=(tmat4x3 const & m); template - GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator=(tmat4x3 const & m); template - GLM_FUNC_DECL tmat4x3 & operator+= (U s); + GLM_FUNC_DECL tmat4x3 & operator+=(U s); template - GLM_FUNC_DECL tmat4x3 & operator+= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator+=(tmat4x3 const & m); template - GLM_FUNC_DECL tmat4x3 & operator-= (U s); + GLM_FUNC_DECL tmat4x3 & operator-=(U s); template - GLM_FUNC_DECL tmat4x3 & operator-= (tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 & operator-=(tmat4x3 const & m); template - GLM_FUNC_DECL tmat4x3 & operator*= (U s); + GLM_FUNC_DECL tmat4x3 & operator*=(U s); template - GLM_FUNC_DECL tmat4x3 & operator/= (U s); + GLM_FUNC_DECL tmat4x3 & operator/=(U s); ////////////////////////////////////// // Increment and decrement operators - GLM_FUNC_DECL tmat4x3 & operator++ (); - GLM_FUNC_DECL tmat4x3 & operator-- (); + GLM_FUNC_DECL tmat4x3 & operator++(); + GLM_FUNC_DECL tmat4x3 & operator--(); GLM_FUNC_DECL tmat4x3 operator++(int); GLM_FUNC_DECL tmat4x3 operator--(int); }; // Binary operators template - GLM_FUNC_DECL tmat4x3 operator+ ( - tmat4x3 const & m, - T const & s); + GLM_FUNC_DECL tmat4x3 operator+(tmat4x3 const & m, T const & s); template - GLM_FUNC_DECL tmat4x3 operator+ ( - tmat4x3 const & m1, - tmat4x3 const & m2); + GLM_FUNC_DECL tmat4x3 operator+(tmat4x3 const & m1, tmat4x3 const & m2); template - GLM_FUNC_DECL tmat4x3 operator- ( - tmat4x3 const & m, - T const & s); + GLM_FUNC_DECL tmat4x3 operator-(tmat4x3 const & m, T const & s); template - GLM_FUNC_DECL tmat4x3 operator- ( - tmat4x3 const & m1, - tmat4x3 const & m2); + GLM_FUNC_DECL tmat4x3 operator-(tmat4x3 const & m1, tmat4x3 const & m2); template - GLM_FUNC_DECL tmat4x3 operator* ( - tmat4x3 const & m, - T const & s); + GLM_FUNC_DECL tmat4x3 operator*(tmat4x3 const & m, T const & s); template - GLM_FUNC_DECL tmat4x3 operator* ( - T const & s, - tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 operator*(T const & s, tmat4x3 const & m); template - GLM_FUNC_DECL typename tmat4x3::col_type operator* ( - tmat4x3 const & m, - typename tmat4x3::row_type const & v); + GLM_FUNC_DECL typename tmat4x3::col_type operator*(tmat4x3 const & m, typename tmat4x3::row_type const & v); template - GLM_FUNC_DECL typename tmat4x3::row_type operator* ( - typename tmat4x3::col_type const & v, - tmat4x3 const & m); + GLM_FUNC_DECL typename tmat4x3::row_type operator*(typename tmat4x3::col_type const & v, tmat4x3 const & m); template - GLM_FUNC_DECL tmat2x3 operator* ( - tmat4x3 const & m1, - tmat2x4 const & m2); + GLM_FUNC_DECL tmat2x3 operator*(tmat4x3 const & m1, tmat2x4 const & m2); template - GLM_FUNC_DECL tmat3x3 operator* ( - tmat4x3 const & m1, - tmat3x4 const & m2); + GLM_FUNC_DECL tmat3x3 operator*(tmat4x3 const & m1, tmat3x4 const & m2); template - GLM_FUNC_DECL tmat4x3 operator* ( - tmat4x3 const & m1, - tmat4x4 const & m2); + GLM_FUNC_DECL tmat4x3 operator*(tmat4x3 const & m1, tmat4x4 const & m2); template - GLM_FUNC_DECL tmat4x3 operator/ ( - tmat4x3 const & m, - T const & s); + GLM_FUNC_DECL tmat4x3 operator/(tmat4x3 const & m, T const & s); template - GLM_FUNC_DECL tmat4x3 operator/ ( - T const & s, - tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 operator/(T const & s, tmat4x3 const & m); // Unary constant operators template - GLM_FUNC_DECL tmat4x3 const operator- ( - tmat4x3 const & m); + GLM_FUNC_DECL tmat4x3 const operator-(tmat4x3 const & m); }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat4x3.inl b/glm/detail/type_mat4x3.inl index d87b5de4..8ac1a3c6 100644 --- a/glm/detail/type_mat4x3.inl +++ b/glm/detail/type_mat4x3.inl @@ -46,22 +46,14 @@ namespace glm // Accesses template - GLM_FUNC_QUALIFIER typename tmat4x3::col_type & - tmat4x3::operator[] - ( - size_type i - ) + GLM_FUNC_QUALIFIER typename tmat4x3::col_type & tmat4x3::operator[](size_type i) { assert(i < this->length()); return this->value[i]; } template - GLM_FUNC_QUALIFIER typename tmat4x3::col_type const & - tmat4x3::operator[] - ( - size_type i - ) const + GLM_FUNC_QUALIFIER typename tmat4x3::col_type const & tmat4x3::operator[](size_type i) const { assert(i < this->length()); return this->value[i]; @@ -82,8 +74,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3( - tmat4x3 const & m) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x3 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -93,8 +84,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3( - tmat4x3 const & m) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x3 const & m) { this->value[0] = m.value[0]; this->value[1] = m.value[1]; @@ -107,14 +97,12 @@ namespace glm {} template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3( - T const & s) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(T const & s) { - value_type const Zero(0); - this->value[0] = col_type(s, Zero, Zero); - this->value[1] = col_type(Zero, s, Zero); - this->value[2] = col_type(Zero, Zero, s); - this->value[3] = col_type(Zero, Zero, Zero); + this->value[0] = col_type(s, 0, 0); + this->value[1] = col_type(0, s, 0); + this->value[2] = col_type(0, 0, s); + this->value[3] = col_type(0, 0, 0); } template @@ -191,10 +179,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -203,34 +188,25 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat2x2 const & m) { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(1)); - this->value[3] = col_type(static_cast(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(m[2], 1); + this->value[3] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat3x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); this->value[2] = col_type(m[2]); - this->value[3] = col_type(static_cast(0)); + this->value[3] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); @@ -239,73 +215,55 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat2x3 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(static_cast(0), value_type(0), value_type(1)); - this->value[3] = col_type(static_cast(0)); + this->value[2] = col_type(0, 0, 1); + this->value[3] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat3x2 const & m) { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(1)); - this->value[3] = col_type(static_cast(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(m[2], 1); + this->value[3] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat2x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(static_cast(0), value_type(0), value_type(1)); - this->value[3] = col_type(static_cast(0)); + this->value[2] = col_type(0, 0, 1); + this->value[3] = col_type(0); } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat4x2 const & m) { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(1)); - this->value[3] = col_type(m[3], value_type(0)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(m[2], 1); + this->value[3] = col_type(m[3], 0); } template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3(tmat3x4 const & m) { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); this->value[2] = col_type(m[2]); - this->value[3] = col_type(static_cast(0)); + this->value[3] = col_type(0); } ////////////////////////////////////////////////////////////// // Unary updatable operators template - GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator= - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator=(tmat4x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -316,10 +274,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator= - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator=(tmat4x3 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -330,7 +285,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator+= (U s) + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator+=(U s) { this->value[0] += s; this->value[1] += s; @@ -341,7 +296,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator+= (tmat4x3 const & m) + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator+=(tmat4x3 const & m) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -352,7 +307,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-= (U s) + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-=(U s) { this->value[0] -= s; this->value[1] -= s; @@ -363,7 +318,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-= (tmat4x3 const & m) + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-=(tmat4x3 const & m) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -374,7 +329,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator*= (U s) + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator*=(U s) { this->value[0] *= s; this->value[1] *= s; @@ -385,7 +340,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator/= (U s) + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator/=(U s) { this->value[0] /= s; this->value[1] /= s; @@ -395,7 +350,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator++ () + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator++() { ++this->value[0]; ++this->value[1]; @@ -405,7 +360,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-- () + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator--() { --this->value[0]; --this->value[1]; @@ -418,9 +373,7 @@ namespace glm // Binary operators template - GLM_FUNC_QUALIFIER tmat4x3 operator+ ( - tmat4x3 const & m, - T const & s) + GLM_FUNC_QUALIFIER tmat4x3 operator+(tmat4x3 const & m, T const & s) { return tmat4x3( m[0] + s, @@ -430,9 +383,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 operator+ ( - tmat4x3 const & m1, - tmat4x3 const & m2) + GLM_FUNC_QUALIFIER tmat4x3 operator+(tmat4x3 const & m1, tmat4x3 const & m2) { return tmat4x3( m1[0] + m2[0], @@ -442,9 +393,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 operator- ( - tmat4x3 const & m, - T const & s) + GLM_FUNC_QUALIFIER tmat4x3 operator-(tmat4x3 const & m, T const & s) { return tmat4x3( m[0] - s, @@ -454,9 +403,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 operator- ( - tmat4x3 const & m1, - tmat4x3 const & m2) + GLM_FUNC_QUALIFIER tmat4x3 operator-(tmat4x3 const & m1, tmat4x3 const & m2) { return tmat4x3( m1[0] - m2[0], @@ -466,9 +413,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 operator* ( - tmat4x3 const & m, - T const & s) + GLM_FUNC_QUALIFIER tmat4x3 operator*(tmat4x3 const & m, T const & s) { return tmat4x3( m[0] * s, @@ -478,9 +423,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 operator* ( - T const & s, - tmat4x3 const & m) + GLM_FUNC_QUALIFIER tmat4x3 operator*(T const & s, tmat4x3 const & m) { return tmat4x3( m[0] * s, @@ -515,11 +458,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x3 operator* - ( - tmat4x3 const & m1, - tmat2x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x3 operator*(tmat4x3 const & m1, tmat2x4 const & m2) { return tmat2x3( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -531,11 +470,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x3 operator* - ( - tmat4x3 const & m1, - tmat3x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x3 operator*(tmat4x3 const & m1, tmat3x4 const & m2) { T const SrcA00 = m1[0][0]; T const SrcA01 = m1[0][1]; @@ -577,11 +512,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 operator* - ( - tmat4x3 const & m1, - tmat4x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x3 operator*(tmat4x3 const & m1, tmat4x4 const & m2) { return tmat4x3( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -599,11 +530,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 operator/ - ( - tmat4x3 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x3 operator/(tmat4x3 const & m, T const & s) { return tmat4x3( m[0] / s, @@ -613,11 +540,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 operator/ - ( - T const & s, - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3 operator/(T const & s, tmat4x3 const & m) { return tmat4x3( s / m[0], @@ -628,10 +551,7 @@ namespace glm // Unary constant operators template - GLM_FUNC_QUALIFIER tmat4x3 const operator- - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x3 const operator-(tmat4x3 const & m) { return tmat4x3( -m[0], @@ -641,11 +561,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 const operator++ - ( - tmat4x3 const & m, - int - ) + GLM_FUNC_QUALIFIER tmat4x3 const operator++(tmat4x3 const & m, int) { return tmat4x3( m[0] + T(1), @@ -655,11 +571,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x3 const operator-- - ( - tmat4x3 const & m, - int - ) + GLM_FUNC_QUALIFIER tmat4x3 const operator--(tmat4x3 const & m, int) { return tmat4x3( m[0] - T(1), @@ -688,21 +600,13 @@ namespace glm // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat4x3 const & m1, - tmat4x3 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator==(tmat4x3 const & m1, tmat4x3 const & m2) { return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); } template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat4x3 const & m1, - tmat4x3 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator!=(tmat4x3 const & m1, tmat4x3 const & m2) { return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); } diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index 3f2fa07b..6034f0c7 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -69,10 +69,8 @@ namespace glm template GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); - GLM_FUNC_DECL explicit tmat4x4( - ctor Null); - GLM_FUNC_DECL explicit tmat4x4( - T const & x); + GLM_FUNC_DECL explicit tmat4x4(ctor); + GLM_FUNC_DECL explicit tmat4x4(T const & x); GLM_FUNC_DECL tmat4x4( T const & x0, T const & y0, T const & z0, T const & w0, T const & x1, T const & y1, T const & z1, T const & w1, @@ -122,130 +120,93 @@ namespace glm GLM_FUNC_DECL col_type & operator[](length_t i); GLM_FUNC_DECL col_type const & operator[](length_t i) const; - GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator=(tmat4x4 const & m); template - GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator=(tmat4x4 const & m); template - GLM_FUNC_DECL tmat4x4 & operator+= (U s); + GLM_FUNC_DECL tmat4x4 & operator+=(U s); template - GLM_FUNC_DECL tmat4x4 & operator+= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator+=(tmat4x4 const & m); template - GLM_FUNC_DECL tmat4x4 & operator-= (U s); + GLM_FUNC_DECL tmat4x4 & operator-=(U s); template - GLM_FUNC_DECL tmat4x4 & operator-= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator-=(tmat4x4 const & m); template - GLM_FUNC_DECL tmat4x4 & operator*= (U s); + GLM_FUNC_DECL tmat4x4 & operator*=(U s); template - GLM_FUNC_DECL tmat4x4 & operator*= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator*=(tmat4x4 const & m); template - GLM_FUNC_DECL tmat4x4 & operator/= (U s); + GLM_FUNC_DECL tmat4x4 & operator/=(U s); template - GLM_FUNC_DECL tmat4x4 & operator/= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator/=(tmat4x4 const & m); ////////////////////////////////////// // Increment and decrement operators - GLM_FUNC_DECL tmat4x4 & operator++ (); - GLM_FUNC_DECL tmat4x4 & operator-- (); + GLM_FUNC_DECL tmat4x4 & operator++(); + GLM_FUNC_DECL tmat4x4 & operator--(); GLM_FUNC_DECL tmat4x4 operator++(int); GLM_FUNC_DECL tmat4x4 operator--(int); }; // Binary operators template - GLM_FUNC_DECL tmat4x4 operator+ ( - tmat4x4 const & m, - T const & s); + GLM_FUNC_DECL tmat4x4 operator+(tmat4x4 const & m, T const & s); template - GLM_FUNC_DECL tmat4x4 operator+ ( - T const & s, - tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 operator+(T const & s, tmat4x4 const & m); template - GLM_FUNC_DECL tmat4x4 operator+ ( - tmat4x4 const & m1, - tmat4x4 const & m2); + GLM_FUNC_DECL tmat4x4 operator+(tmat4x4 const & m1, tmat4x4 const & m2); template - GLM_FUNC_DECL tmat4x4 operator- ( - tmat4x4 const & m, - T const & s); + GLM_FUNC_DECL tmat4x4 operator-(tmat4x4 const & m, T const & s); template - GLM_FUNC_DECL tmat4x4 operator- ( - T const & s, - tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 operator-(T const & s, tmat4x4 const & m); template - GLM_FUNC_DECL tmat4x4 operator- ( - tmat4x4 const & m1, - tmat4x4 const & m2); + GLM_FUNC_DECL tmat4x4 operator-(tmat4x4 const & m1, tmat4x4 const & m2); template - GLM_FUNC_DECL tmat4x4 operator* ( - tmat4x4 const & m, - T const & s); + GLM_FUNC_DECL tmat4x4 operator*(tmat4x4 const & m, T const & s); template - GLM_FUNC_DECL tmat4x4 operator* ( - T const & s, - tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 operator*(T const & s, tmat4x4 const & m); template - GLM_FUNC_DECL typename tmat4x4::col_type operator* ( - tmat4x4 const & m, - typename tmat4x4::row_type const & v); + GLM_FUNC_DECL typename tmat4x4::col_type operator*(tmat4x4 const & m, typename tmat4x4::row_type const & v); template - GLM_FUNC_DECL typename tmat4x4::row_type operator* ( - typename tmat4x4::col_type const & v, - tmat4x4 const & m); + GLM_FUNC_DECL typename tmat4x4::row_type operator*(typename tmat4x4::col_type const & v, tmat4x4 const & m); template - GLM_FUNC_DECL tmat2x4 operator* ( - tmat4x4 const & m1, - tmat2x4 const & m2); + GLM_FUNC_DECL tmat2x4 operator*(tmat4x4 const & m1, tmat2x4 const & m2); template - GLM_FUNC_DECL tmat3x4 operator* ( - tmat4x4 const & m1, - tmat3x4 const & m2); + GLM_FUNC_DECL tmat3x4 operator*(tmat4x4 const & m1, tmat3x4 const & m2); template - GLM_FUNC_DECL tmat4x4 operator* ( - tmat4x4 const & m1, - tmat4x4 const & m2); + GLM_FUNC_DECL tmat4x4 operator*(tmat4x4 const & m1, tmat4x4 const & m2); template - GLM_FUNC_DECL tmat4x4 operator/ ( - tmat4x4 const & m, - T const & s); + GLM_FUNC_DECL tmat4x4 operator/(tmat4x4 const & m, T const & s); template - GLM_FUNC_DECL tmat4x4 operator/ ( - T const & s, - tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 operator/(T const & s, tmat4x4 const & m); template - GLM_FUNC_DECL typename tmat4x4::col_type operator/ ( - tmat4x4 const & m, - typename tmat4x4::row_type const & v); + GLM_FUNC_DECL typename tmat4x4::col_type operator/(tmat4x4 const & m, typename tmat4x4::row_type const & v); template - GLM_FUNC_DECL typename tmat4x4::row_type operator/ ( - typename tmat4x4::col_type & v, - tmat4x4 const & m); + GLM_FUNC_DECL typename tmat4x4::row_type operator/(typename tmat4x4::col_type & v, tmat4x4 const & m); template - GLM_FUNC_DECL tmat4x4 operator/ ( - tmat4x4 const & m1, - tmat4x4 const & m2); + GLM_FUNC_DECL tmat4x4 operator/(tmat4x4 const & m1, tmat4x4 const & m2); // Unary constant operators template - GLM_FUNC_DECL tmat4x4 const operator- ( - tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 const operator-(tmat4x4 const & m); }//namespace glm #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index f6567757..3b488eff 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -106,22 +106,14 @@ namespace detail // Accesses template - GLM_FUNC_QUALIFIER typename tmat4x4::col_type & - tmat4x4::operator[] - ( - length_t i - ) + GLM_FUNC_QUALIFIER typename tmat4x4::col_type & tmat4x4::operator[](length_t i) { assert(i < this->length()); return this->value[i]; } template - GLM_FUNC_QUALIFIER typename tmat4x4::col_type const & - tmat4x4::operator[] - ( - length_t i - ) const + GLM_FUNC_QUALIFIER typename tmat4x4::col_type const & tmat4x4::operator[](length_t i) const { assert(i < this->length()); return this->value[i]; @@ -142,10 +134,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat4x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -155,10 +144,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat4x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -167,23 +153,16 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - ctor - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(ctor) {} template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(T const & s) { - value_type const Zero(0); - this->value[0] = col_type(s, Zero, Zero, Zero); - this->value[1] = col_type(Zero, s, Zero, Zero); - this->value[2] = col_type(Zero, Zero, s, Zero); - this->value[3] = col_type(Zero, Zero, Zero, s); + this->value[0] = col_type(s, 0, 0, 0); + this->value[1] = col_type(0, s, 0, 0); + this->value[2] = col_type(0, 0, s, 0); + this->value[3] = col_type(0, 0, 0, s); } template @@ -295,109 +274,82 @@ namespace detail ////////////////////////////////////// // Matrix convertion constructors template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat2x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat2x2 const & m) { - this->value[0] = col_type(m[0], tvec2(0)); - this->value[1] = col_type(m[1], tvec2(0)); - this->value[2] = col_type(static_cast(0)); - this->value[3] = col_type(static_cast(0), value_type(0), value_type(0), value_type(1)); + this->value[0] = col_type(m[0], 0, 0); + this->value[1] = col_type(m[1], 0, 0); + this->value[2] = col_type(0); + this->value[3] = col_type(0, 0, 0, 1); } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat3x3 const & m) { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(0)); - this->value[3] = col_type(static_cast(0), value_type(0), value_type(0), value_type(1)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(m[2], 0); + this->value[3] = col_type(0, 0, 0, 1); } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat2x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat2x3 const & m) { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(static_cast(0)); - this->value[3] = col_type(static_cast(0), value_type(0), value_type(0), value_type(1)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(0); + this->value[3] = col_type(0, 0, 0, 1); } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat3x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat3x2 const & m) { - this->value[0] = col_type(m[0], tvec2(0)); - this->value[1] = col_type(m[1], tvec2(0)); - this->value[2] = col_type(m[2], tvec2(0)); - this->value[3] = col_type(static_cast(0), value_type(0), value_type(0), value_type(1)); + this->value[0] = col_type(m[0], 0, 0); + this->value[1] = col_type(m[1], 0, 0); + this->value[2] = col_type(m[2], 0, 0); + this->value[3] = col_type(0, 0, 0, 1); } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat2x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat2x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; - this->value[2] = col_type(T(0)); - this->value[3] = col_type(T(0), T(0), T(0), T(1)); + this->value[2] = col_type(0); + this->value[3] = col_type(0, 0, 0, 1); } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat4x2 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat4x2 const & m) { - this->value[0] = col_type(m[0], tvec2(0)); - this->value[1] = col_type(m[1], tvec2(0)); - this->value[2] = col_type(T(0)); - this->value[3] = col_type(T(0), T(0), T(0), T(1)); + this->value[0] = col_type(m[0], 0, 0); + this->value[1] = col_type(m[1], 0, 0); + this->value[2] = col_type(0); + this->value[3] = col_type(0, 0, 0, 1); } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat3x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat3x4 const & m) { this->value[0] = m[0]; this->value[1] = m[1]; this->value[2] = m[2]; - this->value[3] = col_type(T(0), T(0), T(0), T(1)); + this->value[3] = col_type(0, 0, 0, 1); } template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat4x3 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4(tmat4x3 const & m) { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - this->value[2] = col_type(m[2], T(0)); - this->value[3] = col_type(m[3], T(1)); + this->value[0] = col_type(m[0], 0); + this->value[1] = col_type(m[1], 0); + this->value[2] = col_type(m[2], 0); + this->value[3] = col_type(m[3], 1); } ////////////////////////////////////////////////////////////// // Operators template - GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator= - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator=(tmat4x4 const & m) { //memcpy could be faster //memcpy(&this->value, &m.value, 16 * sizeof(valType)); @@ -410,10 +362,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator= - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator=(tmat4x4 const & m) { //memcpy could be faster //memcpy(&this->value, &m.value, 16 * sizeof(valType)); @@ -426,7 +375,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator+= (U s) + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator+=(U s) { this->value[0] += s; this->value[1] += s; @@ -437,7 +386,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator+= (tmat4x4 const & m) + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator+=(tmat4x4 const & m) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -448,7 +397,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-= (U s) + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-=(U s) { this->value[0] -= s; this->value[1] -= s; @@ -459,7 +408,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-= (tmat4x4 const & m) + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-=(tmat4x4 const & m) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -470,7 +419,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator*= (U s) + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator*=(U s) { this->value[0] *= s; this->value[1] *= s; @@ -481,14 +430,14 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator*= (tmat4x4 const & m) + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator*=(tmat4x4 const & m) { return (*this = *this * m); } template template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator/= (U s) + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator/=(U s) { this->value[0] /= s; this->value[1] /= s; @@ -499,13 +448,13 @@ namespace detail template template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator/= (tmat4x4 const & m) + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator/=(tmat4x4 const & m) { return (*this = *this * detail::compute_inverse(m)); } template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator++ () + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator++() { ++this->value[0]; ++this->value[1]; @@ -515,7 +464,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-- () + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator--() { --this->value[0]; --this->value[1]; @@ -542,11 +491,7 @@ namespace detail // Binary operators template - GLM_FUNC_QUALIFIER tmat4x4 operator+ - ( - tmat4x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x4 operator+(tmat4x4 const & m, T const & s) { return tmat4x4( m[0] + s, @@ -556,11 +501,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 operator+ - ( - T const & s, - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4 operator+(T const & s, tmat4x4 const & m) { return tmat4x4( m[0] + s, @@ -570,11 +511,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 operator+ - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x4 operator+(tmat4x4 const & m1, tmat4x4 const & m2) { return tmat4x4( m1[0] + m2[0], @@ -584,11 +521,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 operator- - ( - tmat4x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x4 operator-(tmat4x4 const & m, T const & s) { return tmat4x4( m[0] - s, @@ -598,11 +531,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 operator- - ( - T const & s, - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4 operator-(T const & s, tmat4x4 const & m) { return tmat4x4( s - m[0], @@ -612,11 +541,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 operator- - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x4 operator-(tmat4x4 const & m1, tmat4x4 const & m2) { return tmat4x4( m1[0] - m2[0], @@ -626,11 +551,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 operator* - ( - tmat4x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x4 operator*(tmat4x4 const & m, T const & s) { return tmat4x4( m[0] * s, @@ -640,11 +561,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 operator* - ( - T const & s, - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4 operator*(T const & s, tmat4x4 const & m) { return tmat4x4( m[0] * s, @@ -716,11 +633,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat2x4 operator* - ( - tmat4x4 const & m1, - tmat2x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat2x4 operator*(tmat4x4 const & m1, tmat2x4 const & m2) { return tmat2x4( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -734,11 +647,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat3x4 operator* - ( - tmat4x4 const & m1, - tmat3x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat3x4 operator*(tmat4x4 const & m1, tmat3x4 const & m2) { return tmat3x4( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -756,11 +665,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 operator* - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x4 operator*(tmat4x4 const & m1, tmat4x4 const & m2) { typename tmat4x4::col_type const SrcA0 = m1[0]; typename tmat4x4::col_type const SrcA1 = m1[1]; @@ -781,11 +686,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 operator/ - ( - tmat4x4 const & m, - T const & s - ) + GLM_FUNC_QUALIFIER tmat4x4 operator/(tmat4x4 const & m, T const & s) { return tmat4x4( m[0] / s, @@ -795,11 +696,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 operator/ - ( - T const & s, - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4 operator/(T const & s, tmat4x4 const & m) { return tmat4x4( s / m[0], @@ -809,31 +706,19 @@ namespace detail } template - GLM_FUNC_QUALIFIER typename tmat4x4::col_type operator/ - ( - tmat4x4 const & m, - typename tmat4x4::row_type const & v - ) + GLM_FUNC_QUALIFIER typename tmat4x4::col_type operator/(tmat4x4 const & m, typename tmat4x4::row_type const & v) { return detail::compute_inverse(m) * v; } template - GLM_FUNC_QUALIFIER typename tmat4x4::row_type operator/ - ( - typename tmat4x4::col_type const & v, - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER typename tmat4x4::row_type operator/(typename tmat4x4::col_type const & v, tmat4x4 const & m) { return v * detail::compute_inverse(m); } template - GLM_FUNC_QUALIFIER tmat4x4 operator/ - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) + GLM_FUNC_QUALIFIER tmat4x4 operator/(tmat4x4 const & m1, tmat4x4 const & m2) { tmat4x4 m1_copy(m1); return m1_copy /= m2; @@ -841,10 +726,7 @@ namespace detail // Unary constant operators template - GLM_FUNC_QUALIFIER tmat4x4 const operator- - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tmat4x4 const operator-(tmat4x4 const & m) { return tmat4x4( -m[0], @@ -854,11 +736,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 const operator++ - ( - tmat4x4 const & m, - int - ) + GLM_FUNC_QUALIFIER tmat4x4 const operator++(tmat4x4 const & m, int) { return tmat4x4( m[0] + static_cast(1), @@ -868,11 +746,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 const operator-- - ( - tmat4x4 const & m, - int - ) + GLM_FUNC_QUALIFIER tmat4x4 const operator--(tmat4x4 const & m, int) { return tmat4x4( m[0] - static_cast(1), @@ -885,21 +759,13 @@ namespace detail // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator==(tmat4x4 const & m1, tmat4x4 const & m2) { return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); } template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) + GLM_FUNC_QUALIFIER bool operator!=(tmat4x4 const & m1, tmat4x4 const & m2) { return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); } diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index fbe19189..cbff04fa 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -142,10 +142,10 @@ namespace glm ////////////////////////////////////// // Unary arithmetic operators - GLM_FUNC_DECL tvec1 & operator= (tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator=(tvec1 const & v); template - GLM_FUNC_DECL tvec1 & operator= (tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator=(tvec1 const & v); template GLM_FUNC_DECL tvec1 & operator+=(U const & s); template diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index a5abeaed..d4c5cff2 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -70,14 +70,14 @@ namespace glm {} template - GLM_FUNC_QUALIFIER tvec1::tvec1(tvec1 const & v) : - x(v.x) + GLM_FUNC_QUALIFIER tvec1::tvec1(tvec1 const & v) + : x(v.x) {} template template - GLM_FUNC_QUALIFIER tvec1::tvec1(tvec1 const & v) : - x(v.x) + GLM_FUNC_QUALIFIER tvec1::tvec1(tvec1 const & v) + : x(v.x) {} ////////////////////////////////////// @@ -88,8 +88,8 @@ namespace glm {} template - GLM_FUNC_QUALIFIER tvec1::tvec1(T const & s) : - x(s) + GLM_FUNC_QUALIFIER tvec1::tvec1(T const & s) + : x(s) {} ////////////////////////////////////// @@ -97,48 +97,33 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - tvec1 const & v - ) : - x(static_cast(v.x)) + GLM_FUNC_QUALIFIER tvec1::tvec1(tvec1 const & v) + : x(static_cast(v.x)) {} template template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - tvec2 const & v - ) : - x(static_cast(v.x)) + GLM_FUNC_QUALIFIER tvec1::tvec1(tvec2 const & v) + : x(static_cast(v.x)) {} template template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - tvec3 const & v - ) : - x(static_cast(v.x)) + GLM_FUNC_QUALIFIER tvec1::tvec1(tvec3 const & v) + : x(static_cast(v.x)) {} template template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - tvec4 const & v - ) : - x(static_cast(v.x)) + GLM_FUNC_QUALIFIER tvec1::tvec1(tvec4 const & v) + : x(static_cast(v.x)) {} ////////////////////////////////////// // Unary arithmetic operators template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator=(tvec1 const & v) { this->x = v.x; return *this; @@ -146,10 +131,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator=(tvec1 const & v) { this->x = static_cast(v.x); return *this; @@ -157,10 +139,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+= - ( - U const & s - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+=(U const & s) { this->x += static_cast(s); return *this; @@ -168,10 +147,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+=(tvec1 const & v) { this->x += static_cast(v.x); return *this; @@ -179,10 +155,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-= - ( - U const & s - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-=(U const & s) { this->x -= static_cast(s); return *this; @@ -190,10 +163,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-=(tvec1 const & v) { this->x -= static_cast(v.x); return *this; @@ -201,10 +171,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*= - ( - U const & s - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*=(U const & s) { this->x *= static_cast(s); return *this; @@ -212,10 +179,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*=(tvec1 const & v) { this->x *= static_cast(v.x); return *this; @@ -223,10 +187,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/= - ( - U const & s - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/=(U const & s) { this->x /= static_cast(s); return *this; @@ -234,10 +195,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/=(tvec1 const & v) { this->x /= static_cast(v.x); return *this; @@ -280,21 +238,13 @@ namespace glm // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tvec1 const & v1, - tvec1 const & v2 - ) + 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 - ) + GLM_FUNC_QUALIFIER bool operator!=(tvec1 const & v1, tvec1 const & v2) { return (v1.x != v2.x); } @@ -304,10 +254,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%= - ( - U const & s - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%=(U const & s) { this->x %= static_cast(s); return *this; @@ -315,10 +262,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%=(tvec1 const & v) { this->x %= static_cast(v.x); return *this; @@ -326,10 +270,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&= - ( - U const & s - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&=(U const & s) { this->x &= static_cast(s); return *this; @@ -337,10 +278,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&=(tvec1 const & v) { this->x &= static_cast(v.x); return *this; @@ -348,10 +286,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|= - ( - U const & s - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|=(U const & s) { this->x |= static_cast(s); return *this; @@ -359,10 +294,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|=(tvec1 const & v) { this->x |= U(v.x); return *this; @@ -370,10 +302,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^= - ( - U const & s - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^=(U const & s) { this->x ^= static_cast(s); return *this; @@ -381,10 +310,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^=(tvec1 const & v) { this->x ^= static_cast(v.x); return *this; @@ -392,10 +318,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<= - ( - U const & s - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<=(U const & s) { this->x <<= static_cast(s); return *this; @@ -403,10 +326,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<=(tvec1 const & v) { this->x <<= static_cast(v.x); return *this; @@ -414,10 +334,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>= - ( - U const & s - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>=(U const & s) { this->x >>= static_cast(s); return *this; @@ -425,10 +342,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>= - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>=(tvec1 const & v) { this->x >>= static_cast(v.x); return *this; @@ -438,33 +352,21 @@ namespace glm // Binary arithmetic operators template - GLM_FUNC_QUALIFIER tvec1 operator+ - ( - tvec1 const & v, - T const & s - ) + GLM_FUNC_QUALIFIER tvec1 operator+(tvec1 const & v, T const & s) { return tvec1( v.x + s); } template - GLM_FUNC_QUALIFIER tvec1 operator+ - ( - T const & s, - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator+(T const & s, tvec1 const & v) { return tvec1( s + v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator+ - ( - tvec1 const & v1, - tvec1 const & v2 - ) + GLM_FUNC_QUALIFIER tvec1 operator+(tvec1 const & v1, tvec1 const & v2) { return tvec1( v1.x + v2.x); @@ -472,33 +374,21 @@ namespace glm //operator- template - GLM_FUNC_QUALIFIER tvec1 operator- - ( - tvec1 const & v, - T const & s - ) + GLM_FUNC_QUALIFIER tvec1 operator-(tvec1 const & v, T const & s) { return tvec1( v.x - s); } template - GLM_FUNC_QUALIFIER tvec1 operator- - ( - T const & s, - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator-(T const & s, tvec1 const & v) { return tvec1( s - v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator- - ( - tvec1 const & v1, - tvec1 const & v2 - ) + GLM_FUNC_QUALIFIER tvec1 operator-(tvec1 const & v1, tvec1 const & v2) { return tvec1( v1.x - v2.x); @@ -506,33 +396,21 @@ namespace glm //operator* template - GLM_FUNC_QUALIFIER tvec1 operator* - ( - tvec1 const & v, - T const & s - ) + GLM_FUNC_QUALIFIER tvec1 operator*(tvec1 const & v, T const & s) { return tvec1( v.x * s); } template - GLM_FUNC_QUALIFIER tvec1 operator* - ( - T const & s, - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator*(T const & s, tvec1 const & v) { return tvec1( s * v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator* - ( - tvec1 const & v1, - tvec1 const & v2 - ) + GLM_FUNC_QUALIFIER tvec1 operator*(tvec1 const & v1, tvec1 const & v2) { return tvec1( v1.x * v2.x); @@ -540,33 +418,21 @@ namespace glm //operator/ template - GLM_FUNC_QUALIFIER tvec1 operator/ - ( - tvec1 const & v, - T const & s - ) + GLM_FUNC_QUALIFIER tvec1 operator/(tvec1 const & v, T const & s) { return tvec1( v.x / s); } template - GLM_FUNC_QUALIFIER tvec1 operator/ - ( - T const & s, - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator/(T const & s, tvec1 const & v) { return tvec1( s / v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator/ - ( - tvec1 const & v1, - tvec1 const & v2 - ) + GLM_FUNC_QUALIFIER tvec1 operator/(tvec1 const & v1, tvec1 const & v2) { return tvec1( v1.x / v2.x); @@ -574,32 +440,21 @@ namespace glm // Unary constant operators template - GLM_FUNC_QUALIFIER tvec1 operator- - ( - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator-(tvec1 const & v) { return tvec1( -v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator++ - ( - tvec1 const & v, - int - ) + GLM_FUNC_QUALIFIER tvec1 operator++(tvec1 const & v, int) { return tvec1( v.x + T(1)); } template - GLM_FUNC_QUALIFIER tvec1 operator-- - ( - tvec1 const & v, - int - ) + GLM_FUNC_QUALIFIER tvec1 operator--(tvec1 const & v, int) { return tvec1( v.x - T(1)); @@ -609,208 +464,133 @@ namespace glm // Binary bit operators template - GLM_FUNC_QUALIFIER tvec1 operator% - ( - tvec1 const & v, - T const & s - ) + GLM_FUNC_QUALIFIER tvec1 operator%(tvec1 const & v, T const & s) { return tvec1( v.x % s); } template - GLM_FUNC_QUALIFIER tvec1 operator% - ( - T const & s, - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator%(T const & s, tvec1 const & v) { return tvec1( s % v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator% - ( - tvec1 const & v1, - tvec1 const & v2 - ) + 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 const & s - ) + GLM_FUNC_QUALIFIER tvec1 operator&(tvec1 const & v, T const & s) { return tvec1( v.x & s); } template - GLM_FUNC_QUALIFIER tvec1 operator& - ( - T const & s, - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator&(T const & s, tvec1 const & v) { return tvec1( s & v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator& - ( - tvec1 const & v1, - tvec1 const & v2 - ) + 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 const & s - ) + GLM_FUNC_QUALIFIER tvec1 operator|(tvec1 const & v, T const & s) { return tvec1( v.x | s); } template - GLM_FUNC_QUALIFIER tvec1 operator| - ( - T const & s, - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator|(T const & s, tvec1 const & v) { return tvec1( s | v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator| - ( - tvec1 const & v1, - tvec1 const & v2 - ) + 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 const & s - ) + GLM_FUNC_QUALIFIER tvec1 operator^(tvec1 const & v, T const & s) { return tvec1( v.x ^ s); } template - GLM_FUNC_QUALIFIER tvec1 operator^ - ( - T const & s, - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator^(T const & s, tvec1 const & v) { return tvec1( s ^ v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator^ - ( - tvec1 const & v1, - tvec1 const & v2 - ) + 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 const & s - ) + GLM_FUNC_QUALIFIER tvec1 operator<<(tvec1 const & v, T const & s) { return tvec1( v.x << s); } template - GLM_FUNC_QUALIFIER tvec1 operator<< - ( - T const & s, - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator<<(T const & s, tvec1 const & v) { return tvec1( s << v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator<< - ( - tvec1 const & v1, - tvec1 const & v2 - ) + 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 const & s - ) + GLM_FUNC_QUALIFIER tvec1 operator>>(tvec1 const & v, T const & s) { return tvec1( v.x >> s); } template - GLM_FUNC_QUALIFIER tvec1 operator>> - ( - T const & s, - tvec1 const & v - ) + GLM_FUNC_QUALIFIER tvec1 operator>>(T const & s, tvec1 const & v) { return tvec1( s >> v.x); } template - GLM_FUNC_QUALIFIER tvec1 operator>> - ( - tvec1 const & v1, - tvec1 const & v2 - ) + 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 - ) + GLM_FUNC_QUALIFIER tvec1 operator~(tvec1 const & v) { return tvec1( ~v.x); diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index 274c3ec9..d08de1e4 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -151,10 +151,10 @@ namespace glm ////////////////////////////////////// // Unary arithmetic operators - GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator=(tvec2 const & v); template - GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator=(tvec2 const & v); template GLM_FUNC_DECL tvec2 & operator+=(U s); template diff --git a/glm/detail/type_vec2.inl b/glm/detail/type_vec2.inl index b30f113a..7c5eb0b9 100644 --- a/glm/detail/type_vec2.inl +++ b/glm/detail/type_vec2.inl @@ -88,13 +88,13 @@ namespace glm {} template - GLM_FUNC_QUALIFIER tvec2::tvec2(T const & s) : - x(s), y(s) + GLM_FUNC_QUALIFIER tvec2::tvec2(T const & s) + : x(s), y(s) {} template - GLM_FUNC_QUALIFIER tvec2::tvec2(T const & s1, T const & s2) : - x(s1), y(s2) + GLM_FUNC_QUALIFIER tvec2::tvec2(T const & s1, T const & s2) + : x(s1), y(s2) {} ////////////////////////////////////// @@ -102,16 +102,16 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2::tvec2(A const & a, B const & b) : - x(static_cast(a)), - y(static_cast(b)) + GLM_FUNC_QUALIFIER tvec2::tvec2(A const & a, B const & b) + : x(static_cast(a)) + , y(static_cast(b)) {} template template - GLM_FUNC_QUALIFIER tvec2::tvec2(tvec1 const & a, tvec1 const & b) : - x(a.x), - y(b.x) + GLM_FUNC_QUALIFIER tvec2::tvec2(tvec1 const & a, tvec1 const & b) + : x(static_cast(a.x)) + , y(static_cast(b.x)) {} ////////////////////////////////////// @@ -119,23 +119,23 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2::tvec2(tvec2 const & v) : - x(static_cast(v.x)), - y(static_cast(v.y)) + GLM_FUNC_QUALIFIER tvec2::tvec2(tvec2 const & v) + : x(static_cast(v.x)) + , y(static_cast(v.y)) {} template template - GLM_FUNC_QUALIFIER tvec2::tvec2(tvec3 const & v) : - x(static_cast(v.x)), - y(static_cast(v.y)) + GLM_FUNC_QUALIFIER tvec2::tvec2(tvec3 const & v) + : x(static_cast(v.x)) + , y(static_cast(v.y)) {} template template - GLM_FUNC_QUALIFIER tvec2::tvec2(tvec4 const & v) : - x(static_cast(v.x)), - y(static_cast(v.y)) + GLM_FUNC_QUALIFIER tvec2::tvec2(tvec4 const & v) + : x(static_cast(v.x)) + , y(static_cast(v.y)) {} ////////////////////////////////////// @@ -305,21 +305,13 @@ namespace glm // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tvec2 const & v1, - tvec2 const & v2 - ) + 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 - ) + GLM_FUNC_QUALIFIER bool operator!=(tvec2 const & v1, tvec2 const & v2) { return (v1.x != v2.x) || (v1.y != v2.y); } @@ -329,7 +321,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%= (U s) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%=(U s) { this->x %= static_cast(s); this->y %= static_cast(s); @@ -338,7 +330,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%=(tvec1 const & v) { this->x %= static_cast(v.x); this->y %= static_cast(v.x); @@ -347,7 +339,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%= (tvec2 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%=(tvec2 const & v) { this->x %= static_cast(v.x); this->y %= static_cast(v.y); @@ -356,7 +348,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&= (U s) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&=(U s) { this->x &= static_cast(s); this->y &= static_cast(s); @@ -365,7 +357,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&=(tvec1 const & v) { this->x &= static_cast(v.x); this->y &= static_cast(v.x); @@ -374,7 +366,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&= (tvec2 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&=(tvec2 const & v) { this->x &= static_cast(v.x); this->y &= static_cast(v.y); @@ -383,7 +375,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|= (U s) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|=(U s) { this->x |= static_cast(s); this->y |= static_cast(s); @@ -392,7 +384,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|=(tvec1 const & v) { this->x |= static_cast(v.x); this->y |= static_cast(v.x); @@ -401,7 +393,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|= (tvec2 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|=(tvec2 const & v) { this->x |= static_cast(v.x); this->y |= static_cast(v.y); @@ -410,7 +402,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^= (U s) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^=(U s) { this->x ^= static_cast(s); this->y ^= static_cast(s); @@ -419,7 +411,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^=(tvec1 const & v) { this->x ^= static_cast(v.x); this->y ^= static_cast(v.x); @@ -428,7 +420,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^= (tvec2 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^=(tvec2 const & v) { this->x ^= static_cast(v.x); this->y ^= static_cast(v.y); @@ -437,7 +429,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<= (U s) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<=(U s) { this->x <<= static_cast(s); this->y <<= static_cast(s); @@ -446,7 +438,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<=(tvec1 const & v) { this->x <<= static_cast(v.x); this->y <<= static_cast(v.x); @@ -455,7 +447,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<= (tvec2 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<=(tvec2 const & v) { this->x <<= static_cast(v.x); this->y <<= static_cast(v.y); @@ -464,7 +456,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>= (U s) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>=(U s) { this->x >>= static_cast(s); this->y >>= static_cast(s); @@ -473,7 +465,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>=(tvec1 const & v) { this->x >>= static_cast(v.x); this->y >>= static_cast(v.x); @@ -482,7 +474,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>= (tvec2 const & v) + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>=(tvec2 const & v) { this->x >>= static_cast(v.x); this->y >>= static_cast(v.y); diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index df34d92b..bc15448e 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -173,10 +173,10 @@ namespace glm ////////////////////////////////////// // Unary arithmetic operators - GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator=(tvec3 const & v); template - GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator=(tvec3 const & v); template GLM_FUNC_DECL tvec3 & operator+=(U s); template @@ -214,29 +214,29 @@ namespace glm // Unary bit operators template - GLM_FUNC_DECL tvec3 & operator%= (U s); + GLM_FUNC_DECL tvec3 & operator%=(U s); template - GLM_FUNC_DECL tvec3 & operator%= (tvec1 const & v); + GLM_FUNC_DECL tvec3 & operator%=(tvec1 const & v); template - GLM_FUNC_DECL tvec3 & operator%= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator%=(tvec3 const & v); template - GLM_FUNC_DECL tvec3 & operator&= (U s); + GLM_FUNC_DECL tvec3 & operator&=(U s); template - GLM_FUNC_DECL tvec3 & operator&= (tvec1 const & v); + GLM_FUNC_DECL tvec3 & operator&=(tvec1 const & v); template - GLM_FUNC_DECL tvec3 & operator&= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator&=(tvec3 const & v); template - GLM_FUNC_DECL tvec3 & operator|= (U s); + GLM_FUNC_DECL tvec3 & operator|=(U s); template - GLM_FUNC_DECL tvec3 & operator|= (tvec1 const & v); + GLM_FUNC_DECL tvec3 & operator|=(tvec1 const & v); template - GLM_FUNC_DECL tvec3 & operator|= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator|=(tvec3 const & v); template - GLM_FUNC_DECL tvec3 & operator^= (U s); + GLM_FUNC_DECL tvec3 & operator^=(U s); template - GLM_FUNC_DECL tvec3 & operator^= (tvec1 const & v); + GLM_FUNC_DECL tvec3 & operator^=(tvec1 const & v); template - GLM_FUNC_DECL tvec3 & operator^= (tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator^=(tvec3 const & v); template GLM_FUNC_DECL tvec3 & operator<<=(U s); template diff --git a/glm/detail/type_vec3.inl b/glm/detail/type_vec3.inl index 9413a928..6eb56791 100644 --- a/glm/detail/type_vec3.inl +++ b/glm/detail/type_vec3.inl @@ -201,7 +201,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+=(tvec1 const & v) { this->x += static_cast(v.x); this->y += static_cast(v.x); @@ -211,7 +211,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= (tvec3 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+=(tvec3 const & v) { this->x += static_cast(v.x); this->y += static_cast(v.y); @@ -221,7 +221,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= (U s) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-=(U s) { this->x -= static_cast(s); this->y -= static_cast(s); @@ -231,7 +231,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-=(tvec1 const & v) { this->x -= static_cast(v.x); this->y -= static_cast(v.x); @@ -241,7 +241,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= (tvec3 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-=(tvec3 const & v) { this->x -= static_cast(v.x); this->y -= static_cast(v.y); @@ -251,7 +251,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= (U s) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*=(U s) { this->x *= static_cast(s); this->y *= static_cast(s); @@ -261,7 +261,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*=(tvec1 const & v) { this->x *= static_cast(v.x); this->y *= static_cast(v.x); @@ -271,7 +271,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= (tvec3 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*=(tvec3 const & v) { this->x *= static_cast(v.x); this->y *= static_cast(v.y); @@ -281,7 +281,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= (U s) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/=(U s) { this->x /= static_cast(s); this->y /= static_cast(s); @@ -291,7 +291,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/=(tvec1 const & v) { this->x /= static_cast(v.x); this->y /= static_cast(v.x); @@ -301,7 +301,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= (tvec3 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/=(tvec3 const & v) { this->x /= static_cast(v.x); this->y /= static_cast(v.y); @@ -351,7 +351,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%= (U s) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%=(U s) { this->x %= s; this->y %= s; @@ -361,7 +361,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%=(tvec1 const & v) { this->x %= v.x; this->y %= v.x; @@ -371,7 +371,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%= (tvec3 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%=(tvec3 const & v) { this->x %= v.x; this->y %= v.y; @@ -381,7 +381,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&= (U s) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&=(U s) { this->x &= s; this->y &= s; @@ -391,7 +391,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&=(tvec1 const & v) { this->x &= v.x; this->y &= v.x; @@ -401,7 +401,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&= (tvec3 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&=(tvec3 const & v) { this->x &= v.x; this->y &= v.y; @@ -411,7 +411,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|= (U s) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|=(U s) { this->x |= s; this->y |= s; @@ -421,7 +421,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|=(tvec1 const & v) { this->x |= v.x; this->y |= v.x; @@ -431,7 +431,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|= (tvec3 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|=(tvec3 const & v) { this->x |= v.x; this->y |= v.y; @@ -441,7 +441,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^= (U s) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^=(U s) { this->x ^= s; this->y ^= s; @@ -451,7 +451,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^=(tvec1 const & v) { this->x ^= v.x; this->y ^= v.x; @@ -461,7 +461,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^= (tvec3 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^=(tvec3 const & v) { this->x ^= v.x; this->y ^= v.y; @@ -471,7 +471,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<= (U s) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<=(U s) { this->x <<= s; this->y <<= s; @@ -481,7 +481,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<=(tvec1 const & v) { this->x <<= static_cast(v.x); this->y <<= static_cast(v.x); @@ -491,7 +491,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<= (tvec3 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<=(tvec3 const & v) { this->x <<= static_cast(v.x); this->y <<= static_cast(v.y); @@ -501,7 +501,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>= (U s) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>=(U s) { this->x >>= static_cast(s); this->y >>= static_cast(s); @@ -511,7 +511,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>= (tvec1 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>=(tvec1 const & v) { this->x >>= static_cast(v.x); this->y >>= static_cast(v.x); @@ -521,7 +521,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>= (tvec3 const & v) + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>=(tvec3 const & v) { this->x >>= static_cast(v.x); this->y >>= static_cast(v.y); diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index bffc548c..60643b52 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -254,10 +254,10 @@ namespace glm ////////////////////////////////////// // Unary arithmetic operators - GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator=(tvec4 const & v); template GLM_FUNC_DECL tvec4 & operator+=(U s); template @@ -295,29 +295,29 @@ namespace glm // Unary bit operators template - GLM_FUNC_DECL tvec4 & operator%= (U s); + GLM_FUNC_DECL tvec4 & operator%=(U s); template - GLM_FUNC_DECL tvec4 & operator%= (tvec1 const & v); + GLM_FUNC_DECL tvec4 & operator%=(tvec1 const & v); template - GLM_FUNC_DECL tvec4 & operator%= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator%=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator&= (U s); + GLM_FUNC_DECL tvec4 & operator&=(U s); template - GLM_FUNC_DECL tvec4 & operator&= (tvec1 const & v); + GLM_FUNC_DECL tvec4 & operator&=(tvec1 const & v); template - GLM_FUNC_DECL tvec4 & operator&= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator&=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator|= (U s); + GLM_FUNC_DECL tvec4 & operator|=(U s); template - GLM_FUNC_DECL tvec4 & operator|= (tvec1 const & v); + GLM_FUNC_DECL tvec4 & operator|=(tvec1 const & v); template - GLM_FUNC_DECL tvec4 & operator|= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator|=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator^= (U s); + GLM_FUNC_DECL tvec4 & operator^=(U s); template - GLM_FUNC_DECL tvec4 & operator^= (tvec1 const & v); + GLM_FUNC_DECL tvec4 & operator^=(tvec1 const & v); template - GLM_FUNC_DECL tvec4 & operator^= (tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator^=(tvec4 const & v); template GLM_FUNC_DECL tvec4 & operator<<=(U s); template diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 56d8d4f0..f64ddd18 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -104,11 +104,8 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4::tvec4(tvec4 const & v) : - x(v.x), - y(v.y), - z(v.z), - w(v.w) + GLM_FUNC_QUALIFIER tvec4::tvec4(tvec4 const & v) + : x(v.x), y(v.y), z(v.z), w(v.w) {} ////////////////////////////////////// @@ -119,11 +116,8 @@ namespace glm {} template - GLM_FUNC_QUALIFIER tvec4::tvec4(T const & s) : - x(s), - y(s), - z(s), - w(s) + GLM_FUNC_QUALIFIER tvec4::tvec4(T const & s) + : x(s), y(s), z(s), w(s) {} #if (GLM_HAS_UNRESTRICTED_UNIONS || GLM_HAS_ANONYMOUS_UNION) && (GLM_ARCH & GLM_ARCH_SSE2) @@ -139,11 +133,8 @@ namespace glm #endif template - GLM_FUNC_QUALIFIER tvec4::tvec4(T const & a, T const & b, T const & c, T const & d) : - x(a), - y(b), - z(c), - w(d) + GLM_FUNC_QUALIFIER tvec4::tvec4(T const & a, T const & b, T const & c, T const & d) + : x(a), y(b), z(c), w(d) {} #if (GLM_HAS_UNRESTRICTED_UNIONS || GLM_HAS_ANONYMOUS_UNION) && (GLM_ARCH & GLM_ARCH_SSE2) @@ -773,11 +764,7 @@ namespace glm // Binary arithmetic operators template - GLM_FUNC_QUALIFIER tvec4 operator+ - ( - tvec4 const & v, - T const & s - ) + GLM_FUNC_QUALIFIER tvec4 operator+(tvec4 const & v, T const & s) { return tvec4( v.x + s, @@ -787,11 +774,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator+ - ( - T const & s, - tvec4 const & v - ) + GLM_FUNC_QUALIFIER tvec4 operator+(T const & s, tvec4 const & v) { return tvec4( s + v.x, @@ -801,11 +784,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator+ - ( - tvec4 const & v1, - tvec4 const & v2 - ) + GLM_FUNC_QUALIFIER tvec4 operator+(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x + v2.x, @@ -816,11 +795,7 @@ namespace glm //operator- template - GLM_FUNC_QUALIFIER tvec4 operator- - ( - tvec4 const & v, - T const & s - ) + GLM_FUNC_QUALIFIER tvec4 operator-(tvec4 const & v, T const & s) { return tvec4( v.x - s, @@ -830,11 +805,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator- - ( - T const & s, - tvec4 const & v - ) + GLM_FUNC_QUALIFIER tvec4 operator-(T const & s, tvec4 const & v) { return tvec4( s - v.x, @@ -844,11 +815,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator- - ( - tvec4 const & v1, - tvec4 const & v2 - ) + GLM_FUNC_QUALIFIER tvec4 operator-(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x - v2.x, @@ -859,11 +826,7 @@ namespace glm //operator* template - GLM_FUNC_QUALIFIER tvec4 operator* - ( - tvec4 const & v, - T const & s - ) + GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v, T const & s) { return tvec4( v.x * s, @@ -873,11 +836,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator* - ( - T const & s, - tvec4 const & v - ) + GLM_FUNC_QUALIFIER tvec4 operator*(T const & s, tvec4 const & v) { return tvec4( s * v.x, @@ -887,11 +846,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator* - ( - tvec4 const & v1, - tvec4 const & v2 - ) + GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x * v2.x, @@ -902,11 +857,7 @@ namespace glm //operator/ template - GLM_FUNC_QUALIFIER tvec4 operator/ - ( - tvec4 const & v, - T const & s - ) + GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v, T const & s) { return tvec4( v.x / s, @@ -916,11 +867,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator/ - ( - T const & s, - tvec4 const & v - ) + GLM_FUNC_QUALIFIER tvec4 operator/(T const & s, tvec4 const & v) { return tvec4( s / v.x, @@ -930,11 +877,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator/ - ( - tvec4 const & v1, - tvec4 const & v2 - ) + GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v1, tvec4 const & v2) { return tvec4( v1.x / v2.x, @@ -945,10 +888,7 @@ namespace glm // Unary constant operators template - GLM_FUNC_QUALIFIER tvec4 operator- - ( - tvec4 const & v - ) + GLM_FUNC_QUALIFIER tvec4 operator-(tvec4 const & v) { return tvec4( -v.x, diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index b77b4948..b31428d1 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -72,6 +72,12 @@ namespace glm GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const; #endif//GLM_FORCE_SIZE_FUNC + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL T & operator[](length_t i); + GLM_FUNC_DECL T const & operator[](length_t i) const; + ////////////////////////////////////// // Implicit basic constructors @@ -87,6 +93,7 @@ namespace glm GLM_FUNC_DECL explicit tquat(T const & s, tvec3 const & v); GLM_FUNC_DECL tquat(T const & w, T const & x, T const & y, T const & z); + ////////////////////////////////////// // Convertions /// Create a quaternion from two normalized axis @@ -95,21 +102,13 @@ namespace glm /// @param v A second normalized axis /// @see gtc_quaternion /// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors - GLM_FUNC_DECL explicit tquat( - tvec3 const & u, - tvec3 const & v); + GLM_FUNC_DECL explicit tquat(tvec3 const & u, tvec3 const & v); /// Build a quaternion from euler angles (pitch, yaw, roll), in radians. - GLM_FUNC_DECL explicit tquat( - tvec3 const & eulerAngles); - GLM_FUNC_DECL explicit tquat( - tmat3x3 const & m); - GLM_FUNC_DECL explicit tquat( - tmat4x4 const & m); - - // Accesses - GLM_FUNC_DECL T & operator[](length_t i); - GLM_FUNC_DECL T const & operator[](length_t i) const; + GLM_FUNC_DECL explicit tquat(tvec3 const & eulerAngles); + GLM_FUNC_DECL explicit tquat(tmat3x3 const & m); + GLM_FUNC_DECL explicit tquat(tmat4x4 const & m); + ////////////////////////////////////// // Operators GLM_FUNC_DECL tquat & operator+=(tquat const & q); GLM_FUNC_DECL tquat & operator*=(tquat const & q); @@ -118,75 +117,52 @@ namespace glm }; template - GLM_FUNC_DECL tquat operator- ( - tquat const & q); + GLM_FUNC_DECL tquat operator-(tquat const & q); template - GLM_FUNC_DECL tquat operator+ ( - tquat const & q, - tquat const & p); + GLM_FUNC_DECL tquat operator+(tquat const & q, tquat const & p); template - GLM_FUNC_DECL tquat operator* ( - tquat const & q, - tquat const & p); + GLM_FUNC_DECL tquat operator*(tquat const & q, tquat const & p); template - GLM_FUNC_DECL tvec3 operator* ( - tquat const & q, - tvec3 const & v); + GLM_FUNC_DECL tvec3 operator*(tquat const & q, tvec3 const & v); template - GLM_FUNC_DECL tvec3 operator* ( - tvec3 const & v, - tquat const & q); + GLM_FUNC_DECL tvec3 operator*(tvec3 const & v, tquat const & q); template - GLM_FUNC_DECL tvec4 operator* ( - tquat const & q, - tvec4 const & v); + GLM_FUNC_DECL tvec4 operator*(tquat const & q, tvec4 const & v); template - GLM_FUNC_DECL tvec4 operator* ( - tvec4 const & v, - tquat const & q); + GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, tquat const & q); template - GLM_FUNC_DECL tquat operator* ( - tquat const & q, - T const & s); + GLM_FUNC_DECL tquat operator*(tquat const & q, T const & s); template - GLM_FUNC_DECL tquat operator* ( - T const & s, - tquat const & q); + GLM_FUNC_DECL tquat operator*(T const & s, tquat const & q); template - GLM_FUNC_DECL tquat operator/ ( - tquat const & q, - T const & s); + GLM_FUNC_DECL tquat operator/(tquat const & q, T const & s); /// Returns the length of the quaternion. /// /// @see gtc_quaternion template - GLM_FUNC_DECL T length( - tquat const & q); + GLM_FUNC_DECL T length(tquat const & q); /// Returns the normalized quaternion. /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat normalize( - tquat const & q); + GLM_FUNC_DECL tquat normalize(tquat const & q); /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... /// /// @see gtc_quaternion template class quatType> - GLM_FUNC_DECL T dot( - quatType const & x, - quatType const & y); + GLM_FUNC_DECL T dot(quatType const & x, quatType const & y); /// Spherical linear interpolation of two quaternions. /// The interpolation is oriented and the rotation is performed at constant speed. @@ -199,10 +175,7 @@ namespace glm /// @see gtc_quaternion /// @see - slerp(tquat const & x, tquat const & y, T const & a) template - GLM_FUNC_DECL tquat mix( - tquat const & x, - tquat const & y, - T const & a); + GLM_FUNC_DECL tquat mix(tquat const & x, tquat const & y, T const & a); /// Linear interpolation of two quaternions. /// The interpolation is oriented. @@ -213,10 +186,7 @@ namespace glm /// @tparam T Value type used to build the quaternion. Supported: half, float or double. /// @see gtc_quaternion template - GLM_FUNC_DECL tquat lerp( - tquat const & x, - tquat const & y, - T const & a); + GLM_FUNC_DECL tquat lerp(tquat const & x, tquat const & y, T const & a); /// Spherical linear interpolation of two quaternions. /// The interpolation always take the short path and the rotation is performed at constant speed. @@ -227,24 +197,19 @@ namespace glm /// @tparam T Value type used to build the quaternion. Supported: half, float or double. /// @see gtc_quaternion template - GLM_FUNC_DECL tquat slerp( - tquat const & x, - tquat const & y, - T const & a); + GLM_FUNC_DECL tquat slerp(tquat const & x, tquat const & y, T const & a); /// Returns the q conjugate. /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat conjugate( - tquat const & q); + GLM_FUNC_DECL tquat conjugate(tquat const & q); /// Returns the q inverse. /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat inverse( - tquat const & q); + GLM_FUNC_DECL tquat inverse(tquat const & q); /// Rotates a quaternion from a vector of 3 components axis and an angle. /// @@ -254,18 +219,14 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat rotate( - tquat const & q, - T const & angle, - tvec3 const & axis); + GLM_FUNC_DECL tquat rotate(tquat const & q, T const & angle, tvec3 const & axis); /// Returns euler angles, yitch as x, yaw as y, roll as z. /// The result is expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise. /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec3 eulerAngles( - tquat const & x); + GLM_FUNC_DECL tvec3 eulerAngles(tquat const & x); /// Returns roll value of euler angles expressed in radians. /// @@ -289,29 +250,25 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tmat3x3 mat3_cast( - tquat const & x); + GLM_FUNC_DECL tmat3x3 mat3_cast(tquat const & x); /// Converts a quaternion to a 4 * 4 matrix. /// /// @see gtc_quaternion template - GLM_FUNC_DECL tmat4x4 mat4_cast( - tquat const & x); + GLM_FUNC_DECL tmat4x4 mat4_cast(tquat const & x); /// Converts a 3 * 3 matrix to a quaternion. /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat quat_cast( - tmat3x3 const & x); + GLM_FUNC_DECL tquat quat_cast(tmat3x3 const & x); /// Converts a 4 * 4 matrix to a quaternion. /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat quat_cast( - tmat4x4 const & x); + GLM_FUNC_DECL tquat quat_cast(tmat4x4 const & x); /// Returns the quaternion rotation angle. /// @@ -323,8 +280,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec3 axis( - tquat const & x); + GLM_FUNC_DECL tvec3 axis(tquat const & x); /// Build a quaternion from an angle and a normalized axis. /// @@ -333,9 +289,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat angleAxis( - T const & angle, - tvec3 const & axis); + GLM_FUNC_DECL tquat angleAxis(T const & angle, tvec3 const & axis); /// Returns the component-wise comparison result of x < y. /// @@ -343,9 +297,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 lessThan( - tquat const & x, - tquat const & y); + GLM_FUNC_DECL tvec4 lessThan(tquat const & x, tquat const & y); /// Returns the component-wise comparison of result x <= y. /// @@ -353,9 +305,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 lessThanEqual( - tquat const & x, - tquat const & y); + GLM_FUNC_DECL tvec4 lessThanEqual(tquat const & x, tquat const & y); /// Returns the component-wise comparison of result x > y. /// @@ -363,9 +313,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 greaterThan( - tquat const & x, - tquat const & y); + GLM_FUNC_DECL tvec4 greaterThan(tquat const & x, tquat const & y); /// Returns the component-wise comparison of result x >= y. /// @@ -373,9 +321,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 greaterThanEqual( - tquat const & x, - tquat const & y); + GLM_FUNC_DECL tvec4 greaterThanEqual(tquat const & x, tquat const & y); /// Returns the component-wise comparison of result x == y. /// @@ -383,9 +329,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 equal( - tquat const & x, - tquat const & y); + GLM_FUNC_DECL tvec4 equal(tquat const & x, tquat const & y); /// Returns the component-wise comparison of result x != y. /// @@ -393,10 +337,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 notEqual( - tquat const & x, - tquat const & y); - + GLM_FUNC_DECL tvec4 notEqual(tquat const & x, tquat const & y); /// @} } //namespace glm diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index df5fa036..86f2f05d 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -59,6 +59,26 @@ namespace detail } #endif + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER T & tquat::operator[] (length_t i) + { + assert(i >= 0 && i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER T const & tquat::operator[] (length_t i) const + { + assert(i >= 0 && i < this->length()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + template GLM_FUNC_QUALIFIER tquat::tquat() # ifndef GLM_FORCE_NO_CTOR_INIT @@ -67,48 +87,35 @@ namespace detail {} template - GLM_FUNC_QUALIFIER tquat::tquat(tquat const & q) : - x(q.x), y(q.y), z(q.z), w(q.w) + GLM_FUNC_QUALIFIER tquat::tquat(tquat const & q) + : x(q.x), y(q.y), z(q.z), w(q.w) {} template template - GLM_FUNC_QUALIFIER tquat::tquat(tquat const & q) : - x(q.x), y(q.y), z(q.z), w(q.w) + GLM_FUNC_QUALIFIER tquat::tquat(tquat const & q) + : x(q.x), y(q.y), z(q.z), w(q.w) {} + ////////////////////////////////////// + // Explicit basic constructors + template GLM_FUNC_QUALIFIER tquat::tquat(ctor) {} template - GLM_FUNC_QUALIFIER tquat::tquat - ( - T const & s, - tvec3 const & v - ) : - x(v.x), - y(v.y), - z(v.z), - w(s) + GLM_FUNC_QUALIFIER tquat::tquat(T const & s, tvec3 const & v) + : x(v.x), y(v.y), z(v.z), w(s) {} template - GLM_FUNC_QUALIFIER tquat::tquat - ( - T const & w, - T const & x, - T const & y, - T const & z - ) : - x(x), - y(y), - z(z), - w(w) + GLM_FUNC_QUALIFIER tquat::tquat(T const & w, T const & x, T const & y, T const & z) + : x(x), y(y), z(z), w(w) {} ////////////////////////////////////////////////////////////// - // tquat conversions + // Conversions //template //GLM_FUNC_QUALIFIER tquat::tquat @@ -129,11 +136,7 @@ namespace detail //} template - GLM_FUNC_QUALIFIER tquat::tquat - ( - tvec3 const & u, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & u, tvec3 const & v) { tvec3 const LocalW(cross(u, v)); T Dot = detail::compute_dot::call(u, v); @@ -143,10 +146,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat::tquat - ( - tvec3 const & eulerAngle - ) + GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & eulerAngle) { tvec3 c = glm::cos(eulerAngle * T(0.5)); tvec3 s = glm::sin(eulerAngle * T(0.5)); @@ -158,54 +158,25 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat::tquat - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tquat::tquat(tmat3x3 const & m) { *this = quat_cast(m); } template - GLM_FUNC_QUALIFIER tquat::tquat - ( - tmat4x4 const & m - ) + GLM_FUNC_QUALIFIER tquat::tquat(tmat4x4 const & m) { *this = quat_cast(m); } - ////////////////////////////////////////////////////////////// - // tquat accesses - - template - GLM_FUNC_QUALIFIER T & tquat::operator[] (length_t i) - { - assert(i >= 0 && i < this->length()); - return (&x)[i]; - } - - template - GLM_FUNC_QUALIFIER T const & tquat::operator[] (length_t i) const - { - assert(i >= 0 && i < this->length()); - return (&x)[i]; - } - template - GLM_FUNC_QUALIFIER tquat conjugate - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER tquat conjugate(tquat const & q) { return tquat(q.w, -q.x, -q.y, -q.z); } template - GLM_FUNC_QUALIFIER tquat inverse - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER tquat inverse(tquat const & q) { return conjugate(q) / dot(q, q); } @@ -214,10 +185,7 @@ namespace detail // tquat operators template - GLM_FUNC_QUALIFIER tquat & tquat::operator += - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER tquat & tquat::operator+=(tquat const & q) { this->w += q.w; this->x += q.x; @@ -227,10 +195,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat & tquat::operator *= - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER tquat & tquat::operator*=(tquat const & q) { tquat const p(*this); @@ -242,10 +207,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat & tquat::operator *= - ( - T const & s - ) + GLM_FUNC_QUALIFIER tquat & tquat::operator*=(T const & s) { this->w *= s; this->x *= s; @@ -255,10 +217,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat & tquat::operator /= - ( - T const & s - ) + GLM_FUNC_QUALIFIER tquat & tquat::operator/=(T const & s) { this->w /= s; this->x /= s; @@ -271,41 +230,26 @@ namespace detail // tquat external operators template - GLM_FUNC_QUALIFIER tquat operator- - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER tquat operator-(tquat const & q) { return tquat(-q.w, -q.x, -q.y, -q.z); } template - GLM_FUNC_QUALIFIER tquat operator+ - ( - tquat const & q, - tquat const & p - ) + GLM_FUNC_QUALIFIER tquat operator+(tquat const & q, tquat const & p) { return tquat(q) += p; } template - GLM_FUNC_QUALIFIER tquat operator* - ( - tquat const & q, - tquat const & p - ) + GLM_FUNC_QUALIFIER tquat operator*(tquat const & q, tquat const & p) { return tquat(q) *= p; } // Transformation template - GLM_FUNC_QUALIFIER tvec3 operator* - ( - tquat const & q, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tvec3 operator*(tquat const & q, tvec3 const & v) { tvec3 const QuatVector(q.x, q.y, q.z); tvec3 const uv(glm::cross(QuatVector, v)); @@ -315,62 +259,38 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec3 operator* - ( - tvec3 const & v, - tquat const & q - ) + GLM_FUNC_QUALIFIER tvec3 operator*(tvec3 const & v, tquat const & q) { return glm::inverse(q) * v; } template - GLM_FUNC_QUALIFIER tvec4 operator* - ( - tquat const & q, - tvec4 const & v - ) + GLM_FUNC_QUALIFIER tvec4 operator*(tquat const & q, tvec4 const & v) { return tvec4(q * tvec3(v), v.w); } template - GLM_FUNC_QUALIFIER tvec4 operator* - ( - tvec4 const & v, - tquat const & q - ) + GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v, tquat const & q) { return glm::inverse(q) * v; } template - GLM_FUNC_QUALIFIER tquat operator* - ( - tquat const & q, - T const & s - ) + GLM_FUNC_QUALIFIER tquat operator*(tquat const & q, T const & s) { return tquat( q.w * s, q.x * s, q.y * s, q.z * s); } template - GLM_FUNC_QUALIFIER tquat operator* - ( - T const & s, - tquat const & q - ) + GLM_FUNC_QUALIFIER tquat operator*(T const & s, tquat const & q) { return q * s; } template - GLM_FUNC_QUALIFIER tquat operator/ - ( - tquat const & q, - T const & s - ) + GLM_FUNC_QUALIFIER tquat operator/(tquat const & q, T const & s) { return tquat( q.w / s, q.x / s, q.y / s, q.z / s); @@ -380,40 +300,26 @@ namespace detail // Boolean operators template - GLM_FUNC_QUALIFIER bool operator== - ( - tquat const & q1, - tquat const & q2 - ) + GLM_FUNC_QUALIFIER bool operator==(tquat const & q1, tquat const & q2) { return (q1.x == q2.x) && (q1.y == q2.y) && (q1.z == q2.z) && (q1.w == q2.w); } template - GLM_FUNC_QUALIFIER bool operator!= - ( - tquat const & q1, - tquat const & q2 - ) + GLM_FUNC_QUALIFIER bool operator!=(tquat const & q1, tquat const & q2) { return (q1.x != q2.x) || (q1.y != q2.y) || (q1.z != q2.z) || (q1.w != q2.w); } //////////////////////////////////////////////////////// template - GLM_FUNC_QUALIFIER T length - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER T length(tquat const & q) { return glm::sqrt(dot(q, q)); } template - GLM_FUNC_QUALIFIER tquat normalize - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER tquat normalize(tquat const & q) { T len = length(q); if(len <= T(0)) // Problem @@ -423,11 +329,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat cross - ( - tquat const & q1, - tquat const & q2 - ) + GLM_FUNC_QUALIFIER tquat cross(tquat const & q1, tquat const & q2) { return tquat( q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z, @@ -438,12 +340,7 @@ namespace detail /* // (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle)) template - GLM_FUNC_QUALIFIER tquat mix - ( - tquat const & x, - tquat const & y, - T const & a - ) + GLM_FUNC_QUALIFIER tquat mix(tquat const & x, tquat const & y, T const & a) { if(a <= T(0)) return x; if(a >= T(1)) return y; @@ -518,12 +415,7 @@ namespace detail */ template - GLM_FUNC_QUALIFIER tquat mix - ( - tquat const & x, - tquat const & y, - T const & a - ) + GLM_FUNC_QUALIFIER tquat mix(tquat const & x, tquat const & y, T const & a) { T cosTheta = dot(x, y); @@ -546,12 +438,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat lerp - ( - tquat const & x, - tquat const & y, - T const & a - ) + GLM_FUNC_QUALIFIER tquat lerp(tquat const & x, tquat const & y, T const & a) { // Lerp is only defined in [0, 1] assert(a >= static_cast(0)); @@ -561,12 +448,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat slerp - ( - tquat const & x, - tquat const & y, - T const & a - ) + GLM_FUNC_QUALIFIER tquat slerp(tquat const & x, tquat const & y, T const & a) { tquat z = y; @@ -599,12 +481,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat rotate - ( - tquat const & q, - T const & angle, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tquat rotate(tquat const & q, T const & angle, tvec3 const & v) { tvec3 Tmp = v; @@ -626,46 +503,31 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec3 eulerAngles - ( - tquat const & x - ) + GLM_FUNC_QUALIFIER tvec3 eulerAngles(tquat const & x) { return tvec3(pitch(x), yaw(x), roll(x)); } template - GLM_FUNC_QUALIFIER T roll - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER T roll(tquat const & q) { return T(atan(T(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); } template - GLM_FUNC_QUALIFIER T pitch - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER T pitch(tquat const & q) { return T(atan(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); } template - GLM_FUNC_QUALIFIER T yaw - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER T yaw(tquat const & q) { return asin(T(-2) * (q.x * q.z - q.w * q.y)); } template - GLM_FUNC_QUALIFIER tmat3x3 mat3_cast - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER tmat3x3 mat3_cast(tquat const & q) { tmat3x3 Result(T(1)); T qxx(q.x * q.x); @@ -693,19 +555,13 @@ namespace detail } template - GLM_FUNC_QUALIFIER tmat4x4 mat4_cast - ( - tquat const & q - ) + GLM_FUNC_QUALIFIER tmat4x4 mat4_cast(tquat const & q) { return tmat4x4(mat3_cast(q)); } template - GLM_FUNC_QUALIFIER tquat quat_cast - ( - tmat3x3 const & m - ) + GLM_FUNC_QUALIFIER tquat quat_cast(tmat3x3 const & m) { T fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2]; T fourYSquaredMinus1 = m[1][1] - m[0][0] - m[2][2]; @@ -769,28 +625,19 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat quat_cast - ( - tmat4x4 const & m4 - ) + GLM_FUNC_QUALIFIER tquat quat_cast(tmat4x4 const & m4) { return quat_cast(tmat3x3(m4)); } template - GLM_FUNC_QUALIFIER T angle - ( - tquat const & x - ) + GLM_FUNC_QUALIFIER T angle(tquat const & x) { return acos(x.w) * T(2); } template - GLM_FUNC_QUALIFIER tvec3 axis - ( - tquat const & x - ) + GLM_FUNC_QUALIFIER tvec3 axis(tquat const & x) { T tmp1 = static_cast(1) - x.w * x.w; if(tmp1 <= static_cast(0)) @@ -800,11 +647,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat angleAxis - ( - T const & angle, - tvec3 const & v - ) + GLM_FUNC_QUALIFIER tquat angleAxis(T const & angle, tvec3 const & v) { tquat Result(uninitialize); @@ -819,11 +662,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec4 lessThan - ( - tquat const & x, - tquat const & y - ) + GLM_FUNC_QUALIFIER tvec4 lessThan(tquat const & x, tquat const & y) { tvec4 Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) @@ -832,11 +671,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec4 lessThanEqual - ( - tquat const & x, - tquat const & y - ) + GLM_FUNC_QUALIFIER tvec4 lessThanEqual(tquat const & x, tquat const & y) { tvec4 Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) @@ -845,11 +680,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec4 greaterThan - ( - tquat const & x, - tquat const & y - ) + GLM_FUNC_QUALIFIER tvec4 greaterThan(tquat const & x, tquat const & y) { tvec4 Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) @@ -858,11 +689,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec4 greaterThanEqual - ( - tquat const & x, - tquat const & y - ) + GLM_FUNC_QUALIFIER tvec4 greaterThanEqual(tquat const & x, tquat const & y) { tvec4 Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) @@ -871,11 +698,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec4 equal - ( - tquat const & x, - tquat const & y - ) + GLM_FUNC_QUALIFIER tvec4 equal(tquat const & x, tquat const & y) { tvec4 Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(x); ++i) @@ -884,11 +707,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec4 notEqual - ( - tquat const & x, - tquat const & y - ) + GLM_FUNC_QUALIFIER tvec4 notEqual(tquat const & x, tquat const & y) { tvec4 Result(uninitialize); for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)