mirror of
https://github.com/g-truc/glm.git
synced 2025-04-10 07:18:54 +00:00
Added support of defaulted functions to GLM types, to use them in unions #366
This commit is contained in:
parent
644e567e09
commit
a56a40e1f2
33 changed files with 517 additions and 305 deletions
|
@ -62,15 +62,14 @@ namespace glm
|
|||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[2];
|
||||
/// @endcond
|
||||
|
||||
public:
|
||||
//////////////////////////////////////
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat2x2();
|
||||
GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m);
|
||||
|
||||
GLM_FUNC_DECL tmat2x2() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
|
||||
|
||||
|
@ -85,6 +84,7 @@ namespace glm
|
|||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
|
||||
template <typename U, typename V, typename M, typename N>
|
||||
GLM_FUNC_DECL tmat2x2(
|
||||
U const & x1, V const & y1,
|
||||
|
@ -130,7 +130,7 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & v);
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & v) GLM_DEFAULT;;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);
|
||||
|
|
|
@ -53,21 +53,23 @@ namespace detail
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
# endif
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
# 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>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, P> const & m)
|
||||
{
|
||||
this->value[0] = m.value[0];
|
||||
this->value[1] = m.value[1];
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -108,6 +110,7 @@ namespace detail
|
|||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename X1, typename Y1, typename X2, typename Y2>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2
|
||||
|
@ -243,13 +246,15 @@ namespace detail
|
|||
//////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -58,14 +58,12 @@ namespace glm
|
|||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[2];
|
||||
/// @endcond
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat2x3();
|
||||
GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat2x3() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
|
||||
|
||||
|
@ -126,7 +124,7 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<U, P> const & m);
|
||||
|
|
|
@ -35,21 +35,23 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0);
|
||||
# endif
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0);
|
||||
# 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>
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, P> const & m)
|
||||
{
|
||||
this->value[0] = m.value[0];
|
||||
this->value[1] = m.value[1];
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -90,6 +92,7 @@ namespace glm
|
|||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
typename X1, typename Y1, typename Z1,
|
||||
|
@ -227,13 +230,15 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -64,8 +64,8 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat2x4();
|
||||
GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat2x4() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
|
||||
|
||||
|
@ -127,7 +127,7 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<U, P> const & m);
|
||||
|
|
|
@ -35,21 +35,23 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0, 0);
|
||||
# endif
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0, 0);
|
||||
# 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>
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, P> const & m)
|
||||
{
|
||||
this->value[0] = m.value[0];
|
||||
this->value[1] = m.value[1];
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -91,6 +93,7 @@ namespace glm
|
|||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
typename X1, typename Y1, typename Z1, typename W1,
|
||||
|
@ -228,13 +231,15 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -64,8 +64,9 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat3x2();
|
||||
GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m);
|
||||
|
||||
GLM_FUNC_DECL tmat3x2() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);
|
||||
|
||||
|
@ -133,7 +134,7 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<U, P> const & m);
|
||||
|
|
|
@ -35,23 +35,25 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
this->value[2] = col_type(0, 0);
|
||||
# endif
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
this->value[2] = col_type(0, 0);
|
||||
# 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>
|
||||
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];
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -102,6 +104,7 @@ namespace glm
|
|||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
typename X1, typename Y1,
|
||||
|
@ -257,14 +260,16 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -68,8 +68,9 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat3x3();
|
||||
GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m);
|
||||
|
||||
GLM_FUNC_DECL tmat3x3() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
|
||||
|
||||
|
@ -137,7 +138,7 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<U, P> const & m);
|
||||
|
|
|
@ -59,27 +59,25 @@ namespace detail
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0);
|
||||
this->value[2] = col_type(0, 0, 1);
|
||||
# endif
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0);
|
||||
this->value[2] = col_type(0, 0, 1);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
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>
|
||||
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];
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -90,6 +88,10 @@ namespace detail
|
|||
this->value[2] = m.value[2];
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(ctor)
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(T const & s)
|
||||
{
|
||||
|
@ -281,14 +283,16 @@ namespace detail
|
|||
//////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -64,8 +64,9 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat3x4();
|
||||
GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m);
|
||||
|
||||
GLM_FUNC_DECL tmat3x4() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
|
||||
|
||||
|
@ -132,7 +133,7 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);
|
||||
|
|
|
@ -35,23 +35,25 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0, 0);
|
||||
this->value[2] = col_type(0, 0, 1, 0);
|
||||
# endif
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0, 0);
|
||||
this->value[2] = col_type(0, 0, 1, 0);
|
||||
# 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>
|
||||
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];
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -103,6 +105,7 @@ namespace glm
|
|||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
typename X1, typename Y1, typename Z1, typename W1,
|
||||
|
@ -256,14 +259,16 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -64,8 +64,9 @@ namespace glm
|
|||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat4x2();
|
||||
GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m);
|
||||
|
||||
GLM_FUNC_DECL tmat4x2() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);
|
||||
|
||||
|
@ -138,7 +139,7 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<U, P> const & m);
|
||||
|
|
|
@ -35,25 +35,27 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
this->value[2] = col_type(0, 0);
|
||||
this->value[3] = col_type(0, 0);
|
||||
# endif
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
this->value[2] = col_type(0, 0);
|
||||
this->value[3] = col_type(0, 0);
|
||||
# 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>
|
||||
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];
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -150,6 +152,7 @@ namespace glm
|
|||
|
||||
//////////////////////////////////////
|
||||
// Conversion
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<U, Q> const & m)
|
||||
|
@ -280,15 +283,17 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -58,13 +58,13 @@ namespace glm
|
|||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
private:
|
||||
// Data
|
||||
col_type value[4];
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat4x3();
|
||||
GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m);
|
||||
|
||||
GLM_FUNC_DECL tmat4x3() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
|
||||
|
||||
|
@ -137,7 +137,7 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);
|
||||
|
|
|
@ -35,25 +35,27 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0);
|
||||
this->value[2] = col_type(0, 0, 1);
|
||||
this->value[3] = col_type(0, 0, 0);
|
||||
# endif
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0);
|
||||
this->value[2] = col_type(0, 0, 1);
|
||||
this->value[3] = col_type(0, 0, 0);
|
||||
# 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>
|
||||
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];
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -280,15 +282,17 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -62,14 +62,12 @@ namespace glm
|
|||
friend tvec4<U, Q> operator/(tvec4<U, Q> const & v, tmat4x4<U, Q> const & m);
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[4];
|
||||
/// @endcond
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat4x4();
|
||||
GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat4x4() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);
|
||||
|
||||
|
@ -142,7 +140,7 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
|
||||
GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<T, P> const & m);
|
||||
GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<U, P> const & m);
|
||||
|
|
|
@ -95,25 +95,27 @@ namespace detail
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0, 0);
|
||||
this->value[2] = col_type(0, 0, 1, 0);
|
||||
this->value[3] = col_type(0, 0, 0, 1);
|
||||
# endif
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4()
|
||||
{
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0, 0);
|
||||
this->value[2] = col_type(0, 0, 1, 0);
|
||||
this->value[3] = col_type(0, 0, 0, 1);
|
||||
# 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>
|
||||
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];
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -246,6 +248,7 @@ namespace detail
|
|||
|
||||
//////////////////////////////////////
|
||||
// Matrix convertion constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat2x2<T, P> const & m)
|
||||
{
|
||||
|
@ -366,17 +369,19 @@ namespace detail
|
|||
//////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -95,8 +95,8 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
GLM_FUNC_DECL tquat();
|
||||
GLM_FUNC_DECL tquat(tquat<T, P> const & q);
|
||||
GLM_FUNC_DECL tquat() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tquat(tquat<T, P> const & q) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tquat(tquat<T, Q> const & q);
|
||||
|
||||
|
@ -135,7 +135,7 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Operators
|
||||
|
||||
GLM_FUNC_DECL tquat<T, P> & operator=(tquat<T, P> const & m);
|
||||
GLM_FUNC_DECL tquat<T, P> & operator=(tquat<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tquat<T, P> & operator=(tquat<U, P> const & m);
|
||||
|
|
|
@ -97,17 +97,19 @@ namespace detail
|
|||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: x(0), y(0), z(0), w(1)
|
||||
# endif
|
||||
{}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: x(0), y(0), z(0), w(1)
|
||||
# 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>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, P> const & q)
|
||||
: x(q.x), y(q.y), z(q.z), w(q.w)
|
||||
{}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -225,15 +227,17 @@ namespace detail
|
|||
//////////////////////////////////////////////////////////////
|
||||
// tquat<valType> operators
|
||||
|
||||
template <typename T, precision P>
|
||||
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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -94,8 +94,8 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
GLM_FUNC_DECL tdualquat();
|
||||
GLM_FUNC_DECL tdualquat(tdualquat<T, P> const & d);
|
||||
GLM_FUNC_DECL tdualquat() GLM_DEFAULT;
|
||||
GLM_FUNC_DECL tdualquat(tdualquat<T, P> const & d) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tdualquat(tdualquat<T, Q> const & d);
|
||||
|
||||
|
@ -117,7 +117,7 @@ namespace glm
|
|||
GLM_FUNC_DECL explicit tdualquat(tmat3x4<T, P> const & aug_mat);
|
||||
|
||||
// Operators
|
||||
GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<T, P> const & m);
|
||||
GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<U, P> const & m);
|
||||
|
|
|
@ -83,19 +83,21 @@ namespace glm
|
|||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: real(tquat<T, P>())
|
||||
, dual(tquat<T, P>(0, 0, 0, 0))
|
||||
# endif
|
||||
{}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: real(tquat<T, P>())
|
||||
, dual(tquat<T, P>(0, 0, 0, 0))
|
||||
# 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>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, P> const & d)
|
||||
: real(d.real)
|
||||
, dual(d.dual)
|
||||
{}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
|
@ -155,13 +157,15 @@ namespace glm
|
|||
//////////////////////////////////////////////////////////////
|
||||
// tdualquat operators
|
||||
|
||||
template <typename T, precision P>
|
||||
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;
|
||||
}
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
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;
|
||||
}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
|
|
|
@ -60,6 +60,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
|
|||
- Added <glm/gtx/wrap.hpp> for texcoord wrapping
|
||||
- Added static components and precision members to all vector and quat types #350
|
||||
- Added .gitignore #349
|
||||
- Added support of defaulted functions to GLM types, to use them in unions #366
|
||||
|
||||
##### Improvements:
|
||||
- Changed usage of __has_include to support Intel compiler #307
|
||||
|
|
|
@ -82,6 +82,22 @@ int test_ctr()
|
|||
{
|
||||
int Error(0);
|
||||
|
||||
# if GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
{
|
||||
union pack
|
||||
{
|
||||
glm::mat2x2 f;
|
||||
glm::mat2x2 i;
|
||||
} A, B;
|
||||
|
||||
A.f = glm::mat2x2(0);
|
||||
Error += glm::all(glm::equal(A.i[0], glm::vec2(0))) ? 0 : 1;
|
||||
|
||||
B.f = glm::mat2x2(1);
|
||||
Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0))) ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
#if GLM_HAS_INITIALIZER_LISTS
|
||||
glm::mat2x2 m0(
|
||||
glm::vec2(0, 1),
|
||||
|
|
|
@ -55,7 +55,23 @@ static int test_operators()
|
|||
int test_ctr()
|
||||
{
|
||||
int Error(0);
|
||||
|
||||
|
||||
# if GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
{
|
||||
union pack
|
||||
{
|
||||
glm::mat2x3 f;
|
||||
glm::mat2x3 i;
|
||||
} A, B;
|
||||
|
||||
A.f = glm::mat2x3(0);
|
||||
Error += glm::all(glm::equal(A.i[0], glm::vec3(0))) ? 0 : 1;
|
||||
|
||||
B.f = glm::mat2x3(1);
|
||||
Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0))) ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
#if GLM_HAS_INITIALIZER_LISTS
|
||||
glm::mat2x3 m0(
|
||||
glm::vec3(0, 1, 2),
|
||||
|
|
|
@ -55,7 +55,23 @@ static int test_operators()
|
|||
int test_ctr()
|
||||
{
|
||||
int Error(0);
|
||||
|
||||
|
||||
# if GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
{
|
||||
union pack
|
||||
{
|
||||
glm::mat2x4 f;
|
||||
glm::mat2x4 i;
|
||||
} A, B;
|
||||
|
||||
A.f = glm::mat2x4(0);
|
||||
Error += glm::all(glm::equal(A.i[0], glm::vec4(0))) ? 0 : 1;
|
||||
|
||||
B.f = glm::mat2x4(1);
|
||||
Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0))) ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
glm::mat2x4 m0(
|
||||
glm::vec4(0, 1, 2, 3),
|
||||
|
|
|
@ -55,7 +55,23 @@ static bool test_operators()
|
|||
int test_ctr()
|
||||
{
|
||||
int Error(0);
|
||||
|
||||
|
||||
# if GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
{
|
||||
union pack
|
||||
{
|
||||
glm::mat3x2 f;
|
||||
glm::mat3x2 i;
|
||||
} A, B;
|
||||
|
||||
A.f = glm::mat3x2(0);
|
||||
Error += glm::all(glm::equal(A.i[0], glm::vec2(0))) ? 0 : 1;
|
||||
|
||||
B.f = glm::mat3x2(1);
|
||||
Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0))) ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
glm::mat3x2 m0(
|
||||
glm::vec2(0, 1),
|
||||
|
|
|
@ -114,7 +114,23 @@ int test_inverse()
|
|||
int test_ctr()
|
||||
{
|
||||
int Error(0);
|
||||
|
||||
|
||||
# if GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
{
|
||||
union pack
|
||||
{
|
||||
glm::mat3x3 f;
|
||||
glm::mat3x3 i;
|
||||
} A, B;
|
||||
|
||||
A.f = glm::mat3x3(0);
|
||||
Error += glm::all(glm::equal(A.i[0], glm::vec3(0))) ? 0 : 1;
|
||||
|
||||
B.f = glm::mat3x3(1);
|
||||
Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0))) ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
glm::mat3x3 m0(
|
||||
glm::vec3(0, 1, 2),
|
||||
|
|
|
@ -55,7 +55,23 @@ static bool test_operators()
|
|||
int test_ctr()
|
||||
{
|
||||
int Error(0);
|
||||
|
||||
|
||||
# if GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
{
|
||||
union pack
|
||||
{
|
||||
glm::mat3x4 f;
|
||||
glm::mat3x4 i;
|
||||
} A, B;
|
||||
|
||||
A.f = glm::mat3x4(0);
|
||||
Error += glm::all(glm::equal(A.i[0], glm::vec4(0))) ? 0 : 1;
|
||||
|
||||
B.f = glm::mat3x4(1);
|
||||
Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0))) ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
glm::mat3x4 m0(
|
||||
glm::vec4(0, 1, 2, 3),
|
||||
|
|
|
@ -56,6 +56,22 @@ int test_ctr()
|
|||
{
|
||||
int Error(0);
|
||||
|
||||
# if GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
{
|
||||
union pack
|
||||
{
|
||||
glm::mat4x2 f;
|
||||
glm::mat4x2 i;
|
||||
} A, B;
|
||||
|
||||
A.f = glm::mat4x2(0);
|
||||
Error += glm::all(glm::equal(A.i[0], glm::vec2(0))) ? 0 : 1;
|
||||
|
||||
B.f = glm::mat4x2(1);
|
||||
Error += glm::all(glm::equal(B.i[0], glm::vec2(1, 0))) ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
glm::mat4x2 m0(
|
||||
glm::vec2(0, 1),
|
||||
|
|
|
@ -56,6 +56,22 @@ int test_ctr()
|
|||
{
|
||||
int Error(0);
|
||||
|
||||
# if GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
{
|
||||
union pack
|
||||
{
|
||||
glm::mat4x3 f;
|
||||
glm::mat4x3 i;
|
||||
} A, B;
|
||||
|
||||
A.f = glm::mat4x3(0);
|
||||
Error += glm::all(glm::equal(A.i[0], glm::vec3(0))) ? 0 : 1;
|
||||
|
||||
B.f = glm::mat4x3(1);
|
||||
Error += glm::all(glm::equal(B.i[0], glm::vec3(1, 0, 0))) ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
#if(GLM_HAS_INITIALIZER_LISTS)
|
||||
glm::mat4x3 m0(
|
||||
glm::vec3(0, 1, 2),
|
||||
|
|
|
@ -203,6 +203,22 @@ int test_ctr()
|
|||
{
|
||||
int Error(0);
|
||||
|
||||
# if GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
{
|
||||
union pack
|
||||
{
|
||||
glm::mat4 f;
|
||||
glm::mat4 i;
|
||||
} A, B;
|
||||
|
||||
A.f = glm::mat4(0);
|
||||
Error += glm::all(glm::equal(A.i[0], glm::vec4(0))) ? 0 : 1;
|
||||
|
||||
B.f = glm::mat4(1);
|
||||
Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0))) ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
#if GLM_HAS_TRIVIAL_QUERIES
|
||||
//Error += std::is_trivially_default_constructible<glm::mat4>::value ? 0 : 1;
|
||||
//Error += std::is_trivially_copy_assignable<glm::mat4>::value ? 0 : 1;
|
||||
|
|
|
@ -296,6 +296,22 @@ int test_quat_ctr()
|
|||
{
|
||||
int Error(0);
|
||||
|
||||
# if GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
{
|
||||
union pack
|
||||
{
|
||||
glm::quat f;
|
||||
glm::quat i;
|
||||
} A, B;
|
||||
|
||||
A.f = glm::quat(0, 0, 0, 0);
|
||||
Error += glm::all(glm::equal(A.i, glm::quat(0, 0, 0, 0))) ? 0 : 1;
|
||||
|
||||
B.f = glm::quat(1, 1, 1, 1);
|
||||
Error += glm::all(glm::equal(B.i, glm::quat(1, 1, 1, 1))) ? 0 : 1;
|
||||
}
|
||||
# endif//GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
# if GLM_HAS_TRIVIAL_QUERIES
|
||||
// Error += std::is_trivially_default_constructible<glm::quat>::value ? 0 : 1;
|
||||
// Error += std::is_trivially_default_constructible<glm::dquat>::value ? 0 : 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue