Fixed memory corruption (undefined behaviour) #303

master
Christophe Riccio ago%!(EXTRA string=10 years)
parent f1d4c39622
commit 7844332816
  1. 3
      glm/detail/type_mat2x2.hpp
  2. 15
      glm/detail/type_mat2x2.inl
  3. 72
      glm/detail/type_mat2x3.hpp
  4. 15
      glm/detail/type_mat2x3.inl
  5. 74
      glm/detail/type_mat2x4.hpp
  6. 15
      glm/detail/type_mat2x4.inl
  7. 72
      glm/detail/type_mat3x2.hpp
  8. 17
      glm/detail/type_mat3x2.inl
  9. 100
      glm/detail/type_mat3x3.hpp
  10. 17
      glm/detail/type_mat3x3.inl
  11. 3
      glm/detail/type_mat3x4.hpp
  12. 17
      glm/detail/type_mat3x4.inl
  13. 17
      glm/detail/type_mat4x2.hpp
  14. 19
      glm/detail/type_mat4x2.inl
  15. 3
      glm/detail/type_mat4x3.hpp
  16. 19
      glm/detail/type_mat4x3.inl
  17. 3
      glm/detail/type_mat4x4.hpp
  18. 21
      glm/detail/type_mat4x4.inl
  19. 52
      glm/detail/type_vec2.hpp
  20. 4
      glm/detail/type_vec4.hpp
  21. 15
      glm/detail/type_vec4.inl
  22. 18
      glm/gtc/quaternion.hpp
  23. 69
      glm/gtc/quaternion.inl
  24. 11
      glm/gtx/dual_quaternion.hpp
  25. 37
      glm/gtx/dual_quaternion.inl

@ -63,6 +63,7 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Constructors // Constructors
GLM_FUNC_DECL tmat2x2(); GLM_FUNC_DECL tmat2x2();
GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m); GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
@ -127,6 +128,8 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m); GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);
template <typename U> template <typename U>

@ -62,6 +62,13 @@ namespace detail
# endif # endif
} }
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, P> const & m)
{
this->value[0] = m.value[0];
this->value[1] = m.value[1];
}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, Q> const & m) GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, Q> const & m)
@ -236,6 +243,14 @@ namespace detail
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Unary updatable operators // Unary updatable operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<T, P> const & m)
{
this->value[0] = m[0];
this->value[1] = m[1];
return *this;
}
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<U, P> const & m) GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<U, P> const & m)

@ -58,6 +58,7 @@ namespace glm
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat2x3(); GLM_FUNC_DECL tmat2x3();
GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m); GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
@ -123,20 +124,22 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator= (tmat2x3<U, P> const & m); GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator+= (U s); GLM_FUNC_DECL tmat2x3<T, P> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator+= (tmat2x3<U, P> const & m); GLM_FUNC_DECL tmat2x3<T, P> & operator+=(tmat2x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator-= (U s); GLM_FUNC_DECL tmat2x3<T, P> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator-= (tmat2x3<U, P> const & m); GLM_FUNC_DECL tmat2x3<T, P> & operator-=(tmat2x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator*= (U s); GLM_FUNC_DECL tmat2x3<T, P> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x3<T, P> & operator/= (U s); GLM_FUNC_DECL tmat2x3<T, P> & operator/=(U s);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
@ -150,74 +153,47 @@ namespace glm
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator+ ( GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T const & s);
tmat2x3<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator+ ( GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
tmat2x3<T, P> const & m1,
tmat2x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator- ( GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T const & s);
tmat2x3<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator- ( GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
tmat2x3<T, P> const & m1,
tmat2x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* ( GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T const & s);
tmat2x3<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* ( GLM_FUNC_DECL tmat2x3<T, P> operator*(T const & s, tmat2x3<T, P> const & m);
T const & s,
tmat2x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator* ( GLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator*(tmat2x3<T, P> const & m, typename tmat2x3<T, P>::row_type const & v);
tmat2x3<T, P> const & m,
typename tmat2x3<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator* ( GLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator*(typename tmat2x3<T, P>::col_type const & v, tmat2x3<T, P> const & m);
typename tmat2x3<T, P>::col_type const & v,
tmat2x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* ( GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat2x2<T, P> const & m2);
tmat2x3<T, P> const & m1,
tmat2x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* ( GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat3x2<T, P> const & m2);
tmat2x3<T, P> const & m1,
tmat3x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator* ( GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat4x2<T, P> const & m2);
tmat2x3<T, P> const & m1,
tmat4x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator/ ( GLM_FUNC_DECL tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T const & s);
tmat2x3<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator/ ( GLM_FUNC_DECL tmat2x3<T, P> operator/(T const & s, tmat2x3<T, P> const & m);
T const & s,
tmat2x3<T, P> const & m);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> const operator- ( GLM_FUNC_DECL tmat2x3<T, P> const operator-(tmat2x3<T, P> const & m);
tmat2x3<T, P> const & m);
}//namespace glm }//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE

@ -44,6 +44,13 @@ namespace glm
# endif # endif
} }
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, P> const & m)
{
this->value[0] = m.value[0];
this->value[1] = m.value[1];
}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, Q> const & m) GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, Q> const & m)
@ -220,6 +227,14 @@ namespace glm
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Unary updatable operators // Unary updatable operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<T, P> const & m)
{
this->value[0] = m[0];
this->value[1] = m[1];
return *this;
}
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<U, P> const & m) GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<U, P> const & m)

@ -58,6 +58,7 @@ namespace glm
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat2x4(); GLM_FUNC_DECL tmat2x4();
GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m); GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
@ -124,20 +125,22 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator= (tmat2x4<U, P> const & m); GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator+= (U s); GLM_FUNC_DECL tmat2x4<T, P> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator+= (tmat2x4<U, P> const & m); GLM_FUNC_DECL tmat2x4<T, P> & operator+=(tmat2x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator-= (U s); GLM_FUNC_DECL tmat2x4<T, P> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator-= (tmat2x4<U, P> const & m); GLM_FUNC_DECL tmat2x4<T, P> & operator-=(tmat2x4<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator*= (U s); GLM_FUNC_DECL tmat2x4<T, P> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat2x4<T, P>& operator/= (U s); GLM_FUNC_DECL tmat2x4<T, P> & operator/=(U s);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
@ -151,74 +154,47 @@ namespace glm
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator+ ( GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T const & s);
tmat2x4<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator+ ( GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
tmat2x4<T, P> const & m1,
tmat2x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator- ( GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T const & s);
tmat2x4<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator- ( GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
tmat2x4<T, P> const & m1,
tmat2x4<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator* ( GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T const & s);
tmat2x4<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator* ( GLM_FUNC_DECL tmat2x4<T, P> operator*(T const & s, tmat2x4<T, P> const & m);
T const & s,
tmat2x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator* ( GLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator*(tmat2x4<T, P> const & m, typename tmat2x4<T, P>::row_type const & v);
tmat2x4<T, P> const & m,
typename tmat2x4<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator* ( GLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator*(typename tmat2x4<T, P>::col_type const & v, tmat2x4<T, P> const & m);
typename tmat2x4<T, P>::col_type const & v,
tmat2x4<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> operator* ( GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat4x2<T, P> const & m2);
tmat2x4<T, P> const & m1,
tmat4x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator* ( GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat2x2<T, P> const & m2);
tmat2x4<T, P> const & m1,
tmat2x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x4<T, P> operator* ( GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat3x2<T, P> const & m2);
tmat2x4<T, P> const & m1,
tmat3x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator/ ( GLM_FUNC_DECL tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, T s);
tmat2x4<T, P> const & m,
T s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> operator/ ( GLM_FUNC_DECL tmat2x4<T, P> operator/(T s, tmat2x4<T, P> const & m);
T s,
tmat2x4<T, P> const & m);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x4<T, P> const operator- ( GLM_FUNC_DECL tmat2x4<T, P> const operator-(tmat2x4<T, P> const & m);
tmat2x4<T, P> const & m);
}//namespace glm }//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE

@ -44,6 +44,13 @@ namespace glm
# endif # endif
} }
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, P> const & m)
{
this->value[0] = m.value[0];
this->value[1] = m.value[1];
}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, Q> const & m) GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, Q> const & m)
@ -221,6 +228,14 @@ namespace glm
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Unary updatable operators // Unary updatable operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<T, P> const & m)
{
this->value[0] = m[0];
this->value[1] = m[1];
return *this;
}
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<U, P> const & m) GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<U, P> const & m)

@ -58,6 +58,7 @@ namespace glm
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat3x2(); GLM_FUNC_DECL tmat3x2();
GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m); GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);
@ -130,20 +131,22 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator= (tmat3x2<U, P> const & m); GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator+= (U s); GLM_FUNC_DECL tmat3x2<T, P> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator+= (tmat3x2<U, P> const & m); GLM_FUNC_DECL tmat3x2<T, P> & operator+=(tmat3x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator-= (U s); GLM_FUNC_DECL tmat3x2<T, P> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator-= (tmat3x2<U, P> const & m); GLM_FUNC_DECL tmat3x2<T, P> & operator-=(tmat3x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator*= (U s); GLM_FUNC_DECL tmat3x2<T, P> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x2<T, P> & operator/= (U s); GLM_FUNC_DECL tmat3x2<T, P> & operator/=(U s);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
@ -156,74 +159,47 @@ namespace glm
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator+ ( GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T const & s);
tmat3x2<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator+ ( GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
tmat3x2<T, P> const & m1,
tmat3x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator- ( GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m, T const & s);
tmat3x2<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator- ( GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
tmat3x2<T, P> const & m1,
tmat3x2<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator* ( GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m, T const & s);
tmat3x2<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator* ( GLM_FUNC_DECL tmat3x2<T, P> operator*(T const & s, tmat3x2<T, P> const & m);
T const & s,
tmat3x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x2<T, P>::col_type operator* ( GLM_FUNC_DECL typename tmat3x2<T, P>::col_type operator*(tmat3x2<T, P> const & m, typename tmat3x2<T, P>::row_type const & v);
tmat3x2<T, P> const & m,
typename tmat3x2<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x2<T, P>::row_type operator* ( GLM_FUNC_DECL typename tmat3x2<T, P>::row_type operator*(typename tmat3x2<T, P>::col_type const & v, tmat3x2<T, P> const & m);
typename tmat3x2<T, P>::col_type const & v,
tmat3x2<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x2<T, P> operator* ( GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat2x3<T, P> const & m2);
tmat3x2<T, P> const & m1,
tmat2x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator* ( GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat3x3<T, P> const & m2);
tmat3x2<T, P> const & m1,
tmat3x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x2<T, P> operator* ( GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat4x3<T, P> const & m2);
tmat3x2<T, P> const & m1,
tmat4x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator/ ( GLM_FUNC_DECL tmat3x2<T, P> operator/(tmat3x2<T, P> const & m, T const & s);
tmat3x2<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> operator/ ( GLM_FUNC_DECL tmat3x2<T, P> operator/(T const & s, tmat3x2<T, P> const & m);
T const & s,
tmat3x2<T, P> const & m);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x2<T, P> const operator-( GLM_FUNC_DECL tmat3x2<T, P> const operator-(tmat3x2<T, P> const & m);
tmat3x2<T, P> const & m);
}//namespace glm }//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE

@ -45,6 +45,14 @@ namespace glm
# endif # endif
} }
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, P> const & m)
{
this->value[0] = m.value[0];
this->value[1] = m.value[1];
this->value[2] = m.value[2];
}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, Q> const & m) GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, Q> const & m)
@ -249,6 +257,15 @@ namespace glm
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Unary updatable operators // Unary updatable operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<T, P> const & m)
{
this->value[0] = m[0];
this->value[1] = m[1];
this->value[2] = m[2];
return *this;
}
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<U, P> const & m) GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<U, P> const & m)

@ -62,6 +62,7 @@ namespace glm
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat3x3(); GLM_FUNC_DECL tmat3x3();
GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m); GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
@ -134,129 +135,94 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator= (tmat3x3<U, P> const & m); GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator+= (U s); GLM_FUNC_DECL tmat3x3<T, P> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator+= (tmat3x3<U, P> const & m); GLM_FUNC_DECL tmat3x3<T, P> & operator+=(tmat3x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator-= (U s); GLM_FUNC_DECL tmat3x3<T, P> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator-= (tmat3x3<U, P> const & m); GLM_FUNC_DECL tmat3x3<T, P> & operator-=(tmat3x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator*= (U s); GLM_FUNC_DECL tmat3x3<T, P> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator*= (tmat3x3<U, P> const & m); GLM_FUNC_DECL tmat3x3<T, P> & operator*=(tmat3x3<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator/= (U s); GLM_FUNC_DECL tmat3x3<T, P> & operator/=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x3<T, P>& operator/= (tmat3x3<U, P> const & m); GLM_FUNC_DECL tmat3x3<T, P> & operator/=(tmat3x3<U, P> const & m);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
GLM_FUNC_DECL tmat3x3<T, P> & operator++ (); GLM_FUNC_DECL tmat3x3<T, P> & operator++();
GLM_FUNC_DECL tmat3x3<T, P> & operator-- (); GLM_FUNC_DECL tmat3x3<T, P> & operator--();
GLM_FUNC_DECL tmat3x3<T, P> operator++(int); GLM_FUNC_DECL tmat3x3<T, P> operator++(int);
GLM_FUNC_DECL tmat3x3<T, P> operator--(int); GLM_FUNC_DECL tmat3x3<T, P> operator--(int);
}; };
// Binary operators // Binary operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+ ( GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T const & s);
tmat3x3<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+ ( GLM_FUNC_DECL tmat3x3<T, P> operator+(T const & s, tmat3x3<T, P> const & m);
T const & s,
tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator+ ( GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
tmat3x3<T, P> const & m1,
tmat3x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator- ( GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m, T const & s);
tmat3x3<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator- ( GLM_FUNC_DECL tmat3x3<T, P> operator-(T const & s, tmat3x3<T, P> const & m);
T const & s,
tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator- ( GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
tmat3x3<T, P> const & m1,
tmat3x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* ( GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m, T const & s);
tmat3x3<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* ( GLM_FUNC_DECL tmat3x3<T, P> operator*(T const & s, tmat3x3<T, P> const & m);
T const & s,
tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator* ( GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator*(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v);
tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator* ( GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator*(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m);
typename tmat3x3<T, P>::col_type const & v,
tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator* ( GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
tmat3x3<T, P> const & m1,
tmat3x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat2x3<T, P> operator* ( GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat2x3<T, P> const & m2);
tmat3x3<T, P> const & m1,
tmat2x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat4x3<T, P> operator* ( GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat4x3<T, P> const & m2);
tmat3x3<T, P> const & m1,
tmat4x3<T, P> const & m2);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator/ ( GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m, T const & s);
tmat3x3<T, P> const & m,
T const & s);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator/ ( GLM_FUNC_DECL tmat3x3<T, P> operator/(T const & s, tmat3x3<T, P> const & m);
T const & s,
tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/ ( GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v);
tmat3x3<T, P> const & m,
typename tmat3x3<T, P>::row_type const & v);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/ ( GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m);
typename tmat3x3<T, P>::col_type const & v,
tmat3x3<T, P> const & m);
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> operator/ ( GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
tmat3x3<T, P> const & m1,
tmat3x3<T, P> const & m2);
// Unary constant operators // Unary constant operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_DECL tmat3x3<T, P> const operator-( GLM_FUNC_DECL tmat3x3<T, P> const operator-(tmat3x3<T, P> const & m);
tmat3x3<T, P> const & m);
}//namespace glm }//namespace glm
#ifndef GLM_EXTERNAL_TEMPLATE #ifndef GLM_EXTERNAL_TEMPLATE

@ -73,6 +73,14 @@ namespace detail
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(ctor) GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(ctor)
{} {}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, P> const & m)
{
this->value[0] = m.value[0];
this->value[1] = m.value[1];
this->value[2] = m.value[2];
}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, Q> const & m) GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, Q> const & m)
@ -273,6 +281,15 @@ namespace detail
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Operators // Operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<T, P> const & m)
{
this->value[0] = m[0];
this->value[1] = m[1];
this->value[2] = m[2];
return *this;
}
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<U, P> const & m) GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<U, P> const & m)

@ -58,6 +58,7 @@ namespace glm
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat3x4(); GLM_FUNC_DECL tmat3x4();
GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m); GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
@ -129,6 +130,8 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m); GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);
template <typename U> template <typename U>

@ -45,6 +45,14 @@ namespace glm
# endif # endif
} }
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, P> const & m)
{
this->value[0] = m.value[0];
this->value[1] = m.value[1];
this->value[2] = m.value[2];
}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, Q> const & m) GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, Q> const & m)
@ -248,6 +256,15 @@ namespace glm
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Unary updatable operators // Unary updatable operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<T, P> const & m)
{
this->value[0] = m[0];
this->value[1] = m[1];
this->value[2] = m[2];
return *this;
}
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<U, P> const & m) GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<U, P> const & m)

@ -58,6 +58,7 @@ namespace glm
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat4x2(); GLM_FUNC_DECL tmat4x2();
GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m); GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);
@ -135,20 +136,22 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator=(tmat4x2<U, P> const & m); GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator+=(U s); GLM_FUNC_DECL tmat4x2<T, P> & operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator+=(tmat4x2<U, P> const & m); GLM_FUNC_DECL tmat4x2<T, P> & operator+=(tmat4x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator-=(U s); GLM_FUNC_DECL tmat4x2<T, P> & operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator-=(tmat4x2<U, P> const & m); GLM_FUNC_DECL tmat4x2<T, P> & operator-=(tmat4x2<U, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator*=(U s); GLM_FUNC_DECL tmat4x2<T, P> & operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x2<T, P>& operator/=(U s); GLM_FUNC_DECL tmat4x2<T, P> & operator/=(U s);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators

@ -46,6 +46,15 @@ namespace glm
# endif # endif
} }
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, P> const & m)
{
this->value[0] = m.value[0];
this->value[1] = m.value[1];
this->value[2] = m.value[2];
this->value[3] = m.value[3];
}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, Q> const & m) GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, Q> const & m)
@ -271,6 +280,16 @@ namespace glm
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Unary updatable operators // Unary updatable operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<T, P> const & m)
{
this->value[0] = m[0];
this->value[1] = m[1];
this->value[2] = m[2];
this->value[3] = m[3];
return *this;
}
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<U, P> const & m) GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<U, P> const & m)

@ -57,6 +57,7 @@ namespace glm
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat4x3(); GLM_FUNC_DECL tmat4x3();
GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m); GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
@ -134,6 +135,8 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m); GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);
template <typename U> template <typename U>

@ -46,6 +46,15 @@ namespace glm
# endif # endif
} }
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, P> const & m)
{
this->value[0] = m.value[0];
this->value[1] = m.value[1];
this->value[2] = m.value[2];
this->value[3] = m.value[3];
}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, Q> const & m) GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, Q> const & m)
@ -271,6 +280,16 @@ namespace glm
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Unary updatable operators // Unary updatable operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<T, P> const & m)
{
this->value[0] = m[0];
this->value[1] = m[1];
this->value[2] = m[2];
this->value[3] = m[3];
return *this;
}
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<U, P> const & m) GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<U, P> const & m)

@ -62,6 +62,7 @@ namespace glm
public: public:
// Constructors // Constructors
GLM_FUNC_DECL tmat4x4(); GLM_FUNC_DECL tmat4x4();
GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m); GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);
@ -139,6 +140,8 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<T, P> const & m);
template <typename U> template <typename U>
GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<U, P> const & m); GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<U, P> const & m);
template <typename U> template <typename U>

@ -106,6 +106,15 @@ namespace detail
# endif # endif
} }
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, P> const & m)
{
this->value[0] = m[0];
this->value[1] = m[1];
this->value[2] = m[2];
this->value[3] = m[3];
}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, Q> const & m) GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, Q> const & m)
@ -357,6 +366,18 @@ namespace detail
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Operators // Operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<T, P> const & m)
{
//memcpy could be faster
//memcpy(&this->value, &m.value, 16 * sizeof(valType));
this->value[0] = m[0];
this->value[1] = m[1];
this->value[2] = m[2];
this->value[3] = m[3];
return *this;
}
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<U, P> const & m) GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<U, P> const & m)

@ -163,34 +163,34 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
GLM_FUNC_DECL tvec2<T, P> & operator=(tvec2<T, P> const & v); GLM_FUNC_DECL tvec2<T, P>& operator=(tvec2<T, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator=(tvec2<U, P> const & v); GLM_FUNC_DECL tvec2<T, P>& operator=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator+=(U s); GLM_FUNC_DECL tvec2<T, P>& operator+=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator+=(tvec1<U, P> const & v); GLM_FUNC_DECL tvec2<T, P>& operator+=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator+=(tvec2<U, P> const & v); GLM_FUNC_DECL tvec2<T, P>& operator+=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator-=(U s); GLM_FUNC_DECL tvec2<T, P>& operator-=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator-=(tvec1<U, P> const & v); GLM_FUNC_DECL tvec2<T, P>& operator-=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator-=(tvec2<U, P> const & v); GLM_FUNC_DECL tvec2<T, P>& operator-=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator*=(U s); GLM_FUNC_DECL tvec2<T, P>& operator*=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator*=(tvec1<U, P> const & v); GLM_FUNC_DECL tvec2<T, P>& operator*=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator*=(tvec2<U, P> const & v); GLM_FUNC_DECL tvec2<T, P>& operator*=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator/=(U s); GLM_FUNC_DECL tvec2<T, P>& operator/=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator/=(tvec1<U, P> const & v); GLM_FUNC_DECL tvec2<T, P>& operator/=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator/=(tvec2<U, P> const & v); GLM_FUNC_DECL tvec2<T, P>& operator/=(tvec2<U, P> const & v);
////////////////////////////////////// //////////////////////////////////////
// Increment and decrement operators // Increment and decrement operators
@ -204,29 +204,29 @@ namespace glm
// Unary bit operators // Unary bit operators
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator%= (U s); GLM_FUNC_DECL tvec2<T, P> & operator%=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator%= (tvec1<U, P> const & v); GLM_FUNC_DECL tvec2<T, P> & operator%=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator%= (tvec2<U, P> const & v); GLM_FUNC_DECL tvec2<T, P> & operator%=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator&= (U s); GLM_FUNC_DECL tvec2<T, P> & operator&=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator&= (tvec1<U, P> const & v); GLM_FUNC_DECL tvec2<T, P> & operator&=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator&= (tvec2<U, P> const & v); GLM_FUNC_DECL tvec2<T, P> & operator&=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator|= (U s); GLM_FUNC_DECL tvec2<T, P> & operator|=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator|= (tvec1<U, P> const & v); GLM_FUNC_DECL tvec2<T, P> & operator|=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator|= (tvec2<U, P> const & v); GLM_FUNC_DECL tvec2<T, P> & operator|=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator^= (U s); GLM_FUNC_DECL tvec2<T, P> & operator^=(U s);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator^= (tvec1<U, P> const & v); GLM_FUNC_DECL tvec2<T, P> & operator^=(tvec1<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator^= (tvec2<U, P> const & v); GLM_FUNC_DECL tvec2<T, P> & operator^=(tvec2<U, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec2<T, P> & operator<<=(U s); GLM_FUNC_DECL tvec2<T, P> & operator<<=(U s);
template <typename U> template <typename U>

@ -167,7 +167,7 @@ namespace detail
// Implicit basic constructors // Implicit basic constructors
GLM_FUNC_DECL tvec4(); GLM_FUNC_DECL tvec4();
//GLM_FUNC_DECL tvec4(tvec4<T, P> const & v); GLM_FUNC_DECL tvec4(tvec4<T, P> const & v);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v); GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
@ -285,7 +285,7 @@ namespace detail
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
//GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<T, P> const & v); GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<T, P> const & v);
template <typename U> template <typename U>
GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<U, P> const & v); GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<U, P> const & v);

@ -42,6 +42,11 @@ namespace glm
# endif # endif
{} {}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v)
: x(v.x), y(v.y), z(v.z), w(v.w)
{}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, Q> const & v) GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, Q> const & v)
@ -245,6 +250,16 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Unary arithmetic operators // Unary arithmetic operators
template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<T, P> const & v)
{
this->x = v.x;
this->y = v.y;
this->z = v.z;
this->w = v.w;
return *this;
}
template <typename T, precision P> template <typename T, precision P>
template <typename U> template <typename U>
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<U, P> const & v) GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<U, P> const & v)

@ -91,6 +91,7 @@ namespace glm
// Implicit basic constructors // Implicit basic constructors
GLM_FUNC_DECL tquat(); GLM_FUNC_DECL tquat();
GLM_FUNC_DECL tquat(tquat<T, P> const & q);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tquat(tquat<T, Q> const & q); GLM_FUNC_DECL tquat(tquat<T, Q> const & q);
@ -133,10 +134,19 @@ namespace glm
////////////////////////////////////// //////////////////////////////////////
// Operators // Operators
GLM_FUNC_DECL tquat<T, P> & operator+=(tquat<T, P> const & q);
GLM_FUNC_DECL tquat<T, P> & operator*=(tquat<T, P> const & q); GLM_FUNC_DECL tquat<T, P> & operator=(tquat<T, P> const & m);
GLM_FUNC_DECL tquat<T, P> & operator*=(T const & s);
GLM_FUNC_DECL tquat<T, P> & operator/=(T const & s); template <typename U>
GLM_FUNC_DECL tquat<T, P> & operator=(tquat<U, P> const & m);
template <typename U>
GLM_FUNC_DECL tquat<T, P> & operator+=(tquat<U, P> const & q);
template <typename U>
GLM_FUNC_DECL tquat<T, P> & operator*=(tquat<U, P> const & q);
template <typename U>
GLM_FUNC_DECL tquat<T, P> & operator*=(U s);
template <typename U>
GLM_FUNC_DECL tquat<T, P> & operator/=(U s);
}; };
template <typename T, precision P> template <typename T, precision P>

@ -104,6 +104,11 @@ namespace detail
# endif # endif
{} {}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, P> const & q)
: x(q.x), y(q.y), z(q.z), w(q.w)
{}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, Q> const & q) GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, Q> const & q)
@ -176,7 +181,7 @@ namespace detail
this->w = c.x * c.y * c.z + s.x * s.y * s.z; this->w = c.x * c.y * c.z + s.x * s.y * s.z;
this->x = s.x * c.y * c.z - c.x * s.y * s.z; this->x = s.x * c.y * c.z - c.x * s.y * s.z;
this->y = c.x * s.y * c.z + s.x * c.y * s.z; this->y = c.x * s.y * c.z + s.x * c.y * s.z;
this->z = c.x * c.y * s.z - s.x * s.y * c.z; this->z = c.x * c.y * s.z - s.x * s.y * c.z;
} }
template <typename T, precision P> template <typename T, precision P>
@ -221,19 +226,43 @@ namespace detail
// tquat<valType> operators // tquat<valType> operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator+=(tquat<T, P> const & q) GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator=(tquat<T, P> const & q)
{
this->w = q.w;
this->x = q.x;
this->y = q.y;
this->z = q.z;
return *this;
}
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator=(tquat<U, P> const & q)
{
this->w = static_cast<T>(q.w);
this->x = static_cast<T>(q.x);
this->y = static_cast<T>(q.y);
this->z = static_cast<T>(q.z);
return *this;
}
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator+=(tquat<U, P> const & q)
{ {
this->w += q.w; this->w += static_cast<T>(q.w);
this->x += q.x; this->x += static_cast<T>(q.x);
this->y += q.y; this->y += static_cast<T>(q.y);
this->z += q.z; this->z += static_cast<T>(q.z);
return *this; return *this;
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(tquat<T, P> const & q) template <typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(tquat<U, P> const & r)
{ {
tquat<T, P> const p(*this); tquat<T, P> const p(*this);
tquat<T, P> const q(r);
this->w = p.w * q.w - p.x * q.x - p.y * q.y - p.z * q.z; this->w = p.w * q.w - p.x * q.x - p.y * q.y - p.z * q.z;
this->x = p.w * q.x + p.x * q.w + p.y * q.z - p.z * q.y; this->x = p.w * q.x + p.x * q.w + p.y * q.z - p.z * q.y;
@ -242,23 +271,25 @@ namespace detail
return *this; return *this;
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(T const & s) template <typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(U s)
{ {
this->w *= s; this->w *= static_cast<U>(s);
this->x *= s; this->x *= static_cast<U>(s);
this->y *= s; this->y *= static_cast<U>(s);
this->z *= s; this->z *= static_cast<U>(s);
return *this; return *this;
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator/=(T const & s) template <typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator/=(U s)
{ {
this->w /= s; this->w /= static_cast<U>(s);
this->x /= s; this->x /= static_cast<U>(s);
this->y /= s; this->y /= static_cast<U>(s);
this->z /= s; this->z /= static_cast<U>(s);
return *this; return *this;
} }

@ -90,6 +90,7 @@ namespace glm
// Implicit basic constructors // Implicit basic constructors
GLM_FUNC_DECL tdualquat(); GLM_FUNC_DECL tdualquat();
GLM_FUNC_DECL tdualquat(tdualquat<T, P> const & d);
template <precision Q> template <precision Q>
GLM_FUNC_DECL tdualquat(tdualquat<T, Q> const & d); GLM_FUNC_DECL tdualquat(tdualquat<T, Q> const & d);
@ -116,8 +117,14 @@ namespace glm
GLM_FUNC_DECL explicit tdualquat(tmat3x4<T, P> const & aug_mat); GLM_FUNC_DECL explicit tdualquat(tmat3x4<T, P> const & aug_mat);
// Operators // Operators
GLM_FUNC_DECL tdualquat<T, P> & operator*=(T const & s); GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<T, P> const & m);
GLM_FUNC_DECL tdualquat<T, P> & operator/=(T const & s);
template <typename U>
GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<U, P> const & m);
template <typename U>
GLM_FUNC_DECL tdualquat<T, P> & operator*=(U s);
template <typename U>
GLM_FUNC_DECL tdualquat<T, P> & operator/=(U s);
}; };
template <typename T, precision P> template <typename T, precision P>

@ -91,6 +91,12 @@ namespace glm
# endif # endif
{} {}
template <typename T, precision P>
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, P> const & d)
: real(d.real)
, dual(d.dual)
{}
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, Q> const & d) GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, Q> const & d)
@ -150,18 +156,37 @@ namespace glm
// tdualquat operators // tdualquat operators
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator*=(T const & s) GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator=(tdualquat<T, P> const & q)
{
this->real = q.real;
this->dual = q.dual;
return *this;
}
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator=(tdualquat<U, P> const & q)
{
this->real = q.real;
this->dual = q.dual;
return *this;
}
template <typename T, precision P>
template <typename U>
GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator*=(U s)
{ {
this->real *= s; this->real *= static_cast<T>(s);
this->dual *= s; this->dual *= static_cast<T>(s);
return *this; return *this;
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator/=(T const & s) template <typename U>
GLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator/=(U s)
{ {
this->real /= s; this->real /= static_cast<T>(s);
this->dual /= s; this->dual /= static_cast<T>(s);
return *this; return *this;
} }

Loading…
Cancel
Save