Clean up doxygen and source
This commit is contained in:
@@ -65,8 +65,7 @@ namespace glm
|
||||
col_type value[2];
|
||||
|
||||
public:
|
||||
//////////////////////////////////////
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL tmat2x2() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m) GLM_DEFAULT;
|
||||
@@ -82,8 +81,7 @@ namespace glm
|
||||
col_type const & v1,
|
||||
col_type const & v2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversions --
|
||||
|
||||
template <typename U, typename V, typename M, typename N>
|
||||
GLM_FUNC_DECL tmat2x2(
|
||||
@@ -95,8 +93,7 @@ namespace glm
|
||||
tvec2<U, P> const & v1,
|
||||
tvec2<V, P> const & v2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tmat2x2(tmat2x2<U, Q> const & m);
|
||||
@@ -110,8 +107,7 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tmat2x2(tmat3x4<T, P> const & x);
|
||||
GLM_FUNC_DECL explicit tmat2x2(tmat4x3<T, P> const & x);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -127,8 +123,7 @@ namespace glm
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & v) GLM_DEFAULT;;
|
||||
|
||||
@@ -151,8 +146,7 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator/=(tmat2x2<U, P> const & m);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator++ ();
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator-- ();
|
||||
@@ -160,7 +154,13 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat2x2<T, P> operator--(int);
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> const operator-(tmat2x2<T, P> const & m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> operator+(tmat2x2<T, P> const & m, T const & s);
|
||||
|
||||
@@ -215,9 +215,13 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
|
||||
|
||||
// Unary constant operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> const operator-(tmat2x2<T, P> const & m);
|
||||
GLM_FUNC_DECL bool operator==(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
|
||||
} //namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -50,8 +50,7 @@ namespace detail
|
||||
}
|
||||
}//namespace detail
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -110,8 +109,7 @@ namespace detail
|
||||
this->value[1] = v1;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename X1, typename Y1, typename X2, typename Y2>
|
||||
@@ -133,8 +131,7 @@ namespace detail
|
||||
this->value[1] = col_type(v2);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// mat2x2 matrix conversions
|
||||
// -- mat2x2 matrix conversions --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -200,8 +197,7 @@ namespace detail
|
||||
this->value[1] = col_type(m[1]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -245,8 +241,7 @@ namespace detail
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Unary updatable operators
|
||||
// -- Unary updatable operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -335,6 +330,8 @@ namespace detail
|
||||
return (*this = *this * detail::compute_inverse<T, P>(m));
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator++()
|
||||
{
|
||||
@@ -367,8 +364,17 @@ namespace detail
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Binary operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P> const operator-(tmat2x2<T, P> const & m)
|
||||
{
|
||||
return tmat2x2<T, P>(
|
||||
-m[0],
|
||||
-m[1]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P> operator+(tmat2x2<T, P> const & m, T const & s)
|
||||
@@ -529,17 +535,7 @@ namespace detail
|
||||
return m1_copy /= m2;
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P> const operator-(tmat2x2<T, P> const & m)
|
||||
{
|
||||
return tmat2x2<T, P>(
|
||||
-m[0],
|
||||
-m[1]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2)
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace glm
|
||||
col_type value[2];
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL tmat2x3() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m) GLM_DEFAULT;
|
||||
@@ -77,8 +77,7 @@ namespace glm
|
||||
col_type const & v0,
|
||||
col_type const & v1);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversions --
|
||||
|
||||
template <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>
|
||||
GLM_FUNC_DECL tmat2x3(
|
||||
@@ -90,8 +89,7 @@ namespace glm
|
||||
tvec3<U, P> const & v1,
|
||||
tvec3<V, P> const & v2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversion
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tmat2x3(tmat2x3<U, Q> const & m);
|
||||
@@ -105,8 +103,7 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tmat2x3(tmat4x2<T, P> const & x);
|
||||
GLM_FUNC_DECL explicit tmat2x3(tmat4x3<T, P> const & x);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -122,8 +119,7 @@ namespace glm
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -142,8 +138,7 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator++ ();
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator-- ();
|
||||
@@ -151,7 +146,12 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat2x3<T, P> operator--(int);
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> const operator-(tmat2x3<T, P> const & m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T const & s);
|
||||
@@ -192,9 +192,13 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> operator/(T const & s, tmat2x3<T, P> const & m);
|
||||
|
||||
// Unary constant operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> const operator-(tmat2x3<T, P> const & m);
|
||||
GLM_FUNC_DECL bool operator==(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -92,8 +91,7 @@ namespace glm
|
||||
this->value[1] = v1;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
@@ -117,8 +115,7 @@ namespace glm
|
||||
this->value[1] = col_type(v2);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -184,8 +181,7 @@ namespace glm
|
||||
this->value[1] = m[1];
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -229,8 +225,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Unary updatable operators
|
||||
// -- Unary updatable operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -305,6 +300,8 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator++()
|
||||
{
|
||||
@@ -337,8 +334,17 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Binary operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P> const operator-(tmat2x3<T, P> const & m)
|
||||
{
|
||||
return tmat2x3<T, P>(
|
||||
-m[0],
|
||||
-m[1]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T const & s)
|
||||
@@ -487,17 +493,7 @@ namespace glm
|
||||
s / m[1]);
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P> const operator-(tmat2x3<T, P> const & m)
|
||||
{
|
||||
return tmat2x3<T, P>(
|
||||
-m[0],
|
||||
-m[1]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2)
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace glm
|
||||
col_type value[2];
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL tmat2x4() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m) GLM_DEFAULT;
|
||||
@@ -77,8 +77,8 @@ namespace glm
|
||||
col_type const & v0,
|
||||
col_type const & v1);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversions --
|
||||
|
||||
template <
|
||||
typename X1, typename Y1, typename Z1, typename W1,
|
||||
typename X2, typename Y2, typename Z2, typename W2>
|
||||
@@ -91,8 +91,7 @@ namespace glm
|
||||
tvec4<U, P> const & v1,
|
||||
tvec4<V, P> const & v2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tmat2x4(tmat2x4<U, Q> const & m);
|
||||
@@ -106,8 +105,7 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tmat2x4(tmat4x2<T, P> const & x);
|
||||
GLM_FUNC_DECL explicit tmat2x4(tmat4x3<T, P> const & x);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -123,8 +121,7 @@ namespace glm
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -143,8 +140,7 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator++ ();
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator-- ();
|
||||
@@ -152,7 +148,12 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat2x4<T, P> operator--(int);
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> const operator-(tmat2x4<T, P> const & m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T const & s);
|
||||
@@ -193,9 +194,13 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> operator/(T s, tmat2x4<T, P> const & m);
|
||||
|
||||
// Unary constant operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> const operator-(tmat2x4<T, P> const & m);
|
||||
GLM_FUNC_DECL bool operator==(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -93,8 +92,7 @@ namespace glm
|
||||
this->value[1] = v1;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
@@ -118,8 +116,7 @@ namespace glm
|
||||
this->value[1] = col_type(v2);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -185,8 +182,7 @@ namespace glm
|
||||
this->value[1] = col_type(m[1], 0);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -230,8 +226,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Unary updatable operators
|
||||
// -- Unary updatable operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -306,6 +301,8 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator++()
|
||||
{
|
||||
@@ -338,8 +335,17 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Binary operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P> const operator-(tmat2x4<T, P> const & m)
|
||||
{
|
||||
return tmat2x4<T, P>(
|
||||
-m[0],
|
||||
-m[1]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T const & s)
|
||||
@@ -496,17 +502,7 @@ namespace glm
|
||||
s / m[1]);
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P> const operator-(tmat2x4<T, P> const & m)
|
||||
{
|
||||
return tmat2x4<T, P>(
|
||||
-m[0],
|
||||
-m[1]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2)
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace glm
|
||||
col_type value[3];
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL tmat3x2() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m) GLM_DEFAULT;
|
||||
@@ -79,8 +79,7 @@ namespace glm
|
||||
col_type const & v1,
|
||||
col_type const & v2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversions --
|
||||
|
||||
template<
|
||||
typename X1, typename Y1,
|
||||
@@ -97,8 +96,7 @@ namespace glm
|
||||
tvec2<V2, P> const & v2,
|
||||
tvec2<V3, P> const & v3);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tmat3x2(tmat3x2<U, Q> const & m);
|
||||
@@ -112,8 +110,7 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tmat3x2(tmat4x2<T, P> const & x);
|
||||
GLM_FUNC_DECL explicit tmat3x2(tmat4x3<T, P> const & x);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -129,8 +126,7 @@ namespace glm
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -149,8 +145,7 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator++ ();
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator-- ();
|
||||
@@ -158,7 +153,13 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat3x2<T, P> operator--(int);
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> const operator-(tmat3x2<T, P> const & m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T const & s);
|
||||
|
||||
@@ -198,9 +199,13 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> operator/(T const & s, tmat3x2<T, P> const & m);
|
||||
|
||||
// Unary constant operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> const operator-(tmat3x2<T, P> const & m);
|
||||
GLM_FUNC_DECL bool operator==(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -104,8 +103,7 @@ namespace glm
|
||||
this->value[2] = v2;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
@@ -138,8 +136,7 @@ namespace glm
|
||||
this->value[2] = col_type(v3);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// mat3x2 matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -214,8 +211,7 @@ namespace glm
|
||||
this->value[2] = col_type(m[2]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -259,8 +255,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Unary updatable operators
|
||||
// -- Unary updatable operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -343,6 +338,8 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator++()
|
||||
{
|
||||
@@ -377,8 +374,18 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Binary operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x2<T, P> const operator-(tmat3x2<T, P> const & m)
|
||||
{
|
||||
return tmat3x2<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T const & s)
|
||||
@@ -520,18 +527,7 @@ namespace glm
|
||||
s / m[2]);
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x2<T, P> const operator-(tmat3x2<T, P> const & m)
|
||||
{
|
||||
return tmat3x2<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2)
|
||||
|
||||
@@ -62,12 +62,10 @@ namespace glm
|
||||
friend tvec3<U, Q> operator/(tvec3<U, Q> const & v, tmat3x3<U, Q> const & m);
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[3];
|
||||
/// @endcond
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL tmat3x3() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m) GLM_DEFAULT;
|
||||
@@ -85,8 +83,7 @@ namespace glm
|
||||
col_type const & v1,
|
||||
col_type const & v2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversions --
|
||||
|
||||
template<
|
||||
typename X1, typename Y1, typename Z1,
|
||||
@@ -103,8 +100,7 @@ namespace glm
|
||||
tvec3<V2, P> const & v2,
|
||||
tvec3<V3, P> const & v3);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tmat3x3(tmat3x3<U, Q> const & m);
|
||||
@@ -118,8 +114,7 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tmat3x3(tmat3x4<T, P> const & x);
|
||||
GLM_FUNC_DECL explicit tmat3x3(tmat4x3<T, P> const & x);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -135,8 +130,7 @@ namespace glm
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -159,8 +153,7 @@ namespace glm
|
||||
template <typename U>
|
||||
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--();
|
||||
@@ -168,7 +161,13 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat3x3<T, P> operator--(int);
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x3<T, P> const operator-(tmat3x3<T, P> const & m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T const & s);
|
||||
|
||||
@@ -223,9 +222,13 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||
|
||||
// Unary constant operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x3<T, P> const operator-(tmat3x3<T, P> const & m);
|
||||
GLM_FUNC_DECL bool operator==(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -56,8 +56,7 @@ namespace detail
|
||||
}
|
||||
}//namespace detail
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -128,8 +127,8 @@ namespace detail
|
||||
this->value[2] = v2;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
typename X1, typename Y1, typename Z1,
|
||||
@@ -161,8 +160,7 @@ namespace detail
|
||||
this->value[2] = col_type(v3);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -237,8 +235,7 @@ namespace detail
|
||||
this->value[2] = m[2];
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -282,8 +279,7 @@ namespace detail
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Operators
|
||||
// -- Unary updatable operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -380,6 +376,8 @@ namespace detail
|
||||
return (*this = *this * detail::compute_inverse<T, P>(m));
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator++()
|
||||
{
|
||||
@@ -414,8 +412,18 @@ namespace detail
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Binary operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> const operator-(tmat3x3<T, P> const & m)
|
||||
{
|
||||
return tmat3x3<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T const & s)
|
||||
@@ -610,18 +618,7 @@ namespace detail
|
||||
return m1_copy /= m2;
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> const operator-(tmat3x3<T, P> const & m)
|
||||
{
|
||||
return tmat3x3<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2)
|
||||
|
||||
@@ -58,12 +58,10 @@ namespace glm
|
||||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[3];
|
||||
/// @endcond
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL tmat3x4() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m) GLM_DEFAULT;
|
||||
@@ -81,8 +79,8 @@ namespace glm
|
||||
col_type const & v1,
|
||||
col_type const & v2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversions --
|
||||
|
||||
template<
|
||||
typename X1, typename Y1, typename Z1, typename W1,
|
||||
typename X2, typename Y2, typename Z2, typename W2,
|
||||
@@ -98,8 +96,7 @@ namespace glm
|
||||
tvec4<V2, P> const & v2,
|
||||
tvec4<V3, P> const & v3);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversion
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tmat3x4(tmat3x4<U, Q> const & m);
|
||||
@@ -113,8 +110,7 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tmat3x4(tmat4x2<T, P> const & x);
|
||||
GLM_FUNC_DECL explicit tmat3x4(tmat4x3<T, P> const & x);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -130,8 +126,7 @@ namespace glm
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -150,8 +145,7 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator++();
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator--();
|
||||
@@ -159,7 +153,13 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat3x4<T, P> operator--(int);
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> const operator-(tmat3x4<T, P> const & m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T const & s);
|
||||
|
||||
@@ -199,9 +199,13 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> operator/(T const & s, tmat3x4<T, P> const & m);
|
||||
|
||||
// Unary constant operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> const operator-(tmat3x4<T, P> const & m);
|
||||
GLM_FUNC_DECL bool operator==(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -104,8 +103,7 @@ namespace glm
|
||||
this->value[2] = v2;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
@@ -138,7 +136,8 @@ namespace glm
|
||||
this->value[2] = col_type(v3);
|
||||
}
|
||||
|
||||
// Conversion
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<U, Q> const & m)
|
||||
@@ -212,8 +211,7 @@ namespace glm
|
||||
this->value[2] = col_type(m[2], 0);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -257,8 +255,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Unary updatable operators
|
||||
// -- Unary updatable operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -341,6 +338,8 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator++()
|
||||
{
|
||||
@@ -375,8 +374,18 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Binary operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P> const operator-(tmat3x4<T, P> const & m)
|
||||
{
|
||||
return tmat3x4<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P> operator+(tmat3x4<T, P> const & m, T const & s)
|
||||
@@ -558,18 +567,7 @@ namespace glm
|
||||
s / m[2]);
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P> const operator-(tmat3x4<T, P> const & m)
|
||||
{
|
||||
return tmat3x4<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tmat3x4<T, P> const & m1, tmat3x4<T, P> const & m2)
|
||||
|
||||
@@ -58,12 +58,10 @@ namespace glm
|
||||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[4];
|
||||
/// @endcond
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL tmat4x2() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m) GLM_DEFAULT;
|
||||
@@ -83,8 +81,7 @@ namespace glm
|
||||
col_type const & v2,
|
||||
col_type const & v3);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversions --
|
||||
|
||||
template <
|
||||
typename X1, typename Y1,
|
||||
@@ -104,8 +101,7 @@ namespace glm
|
||||
tvec2<V3, P> const & v3,
|
||||
tvec2<V4, P> const & v4);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tmat4x2(tmat4x2<U, Q> const & m);
|
||||
@@ -119,8 +115,7 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tmat4x2(tmat4x3<T, P> const & x);
|
||||
GLM_FUNC_DECL explicit tmat4x2(tmat3x4<T, P> const & x);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -136,8 +131,7 @@ namespace glm
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -156,8 +150,7 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator++ ();
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator-- ();
|
||||
@@ -165,7 +158,13 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat4x2<T, P> operator--(int);
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> const operator-(tmat4x2<T, P> const & m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> operator+(tmat4x2<T, P> const & m, T const & s);
|
||||
|
||||
@@ -205,9 +204,13 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> operator/(T const & s, tmat4x2<T, P> const & m);
|
||||
|
||||
// Unary constant operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> const operator-(tmat4x2<T, P> const & m);
|
||||
GLM_FUNC_DECL bool operator==(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -112,8 +111,7 @@ namespace glm
|
||||
this->value[3] = v3;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
@@ -151,8 +149,7 @@ namespace glm
|
||||
this->value[3] = col_type(v4);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion
|
||||
// -- Conversion --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -236,8 +233,7 @@ namespace glm
|
||||
this->value[3] = col_type(0);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -281,8 +277,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Unary updatable operators
|
||||
// -- Unary updatable operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -373,6 +368,8 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator++()
|
||||
{
|
||||
@@ -409,8 +406,19 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Binary operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P> const operator-(tmat4x2<T, P> const & m)
|
||||
{
|
||||
return tmat4x2<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2],
|
||||
-m[3]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P> operator+(tmat4x2<T, P> const & m, T const & s)
|
||||
@@ -565,19 +573,7 @@ namespace glm
|
||||
s / m[3]);
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P> const operator-(tmat4x2<T, P> const & m)
|
||||
{
|
||||
return tmat4x2<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2],
|
||||
-m[3]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tmat4x2<T, P> const & m1, tmat4x2<T, P> const & m2)
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace glm
|
||||
col_type value[4];
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL tmat4x3() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m) GLM_DEFAULT;
|
||||
@@ -81,8 +81,7 @@ namespace glm
|
||||
col_type const & v2,
|
||||
col_type const & v3);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversions --
|
||||
|
||||
template <
|
||||
typename X1, typename Y1, typename Z1,
|
||||
@@ -102,8 +101,7 @@ namespace glm
|
||||
tvec3<V3, P> const & v3,
|
||||
tvec3<V4, P> const & v4);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tmat4x3(tmat4x3<U, Q> const & m);
|
||||
@@ -117,8 +115,7 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tmat4x3(tmat4x2<T, P> const & x);
|
||||
GLM_FUNC_DECL explicit tmat4x3(tmat3x4<T, P> const & x);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -134,8 +131,7 @@ namespace glm
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -154,8 +150,7 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x3<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tmat4x3<T, P> & operator++();
|
||||
GLM_FUNC_DECL tmat4x3<T, P> & operator--();
|
||||
@@ -163,7 +158,13 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat4x3<T, P> operator--(int);
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x3<T, P> const operator-(tmat4x3<T, P> const & m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x3<T, P> operator+(tmat4x3<T, P> const & m, T const & s);
|
||||
|
||||
@@ -203,9 +204,13 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x3<T, P> operator/(T const & s, tmat4x3<T, P> const & m);
|
||||
|
||||
// Unary constant operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x3<T, P> const operator-(tmat4x3<T, P> const & m);
|
||||
GLM_FUNC_DECL bool operator==(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -112,8 +111,7 @@ namespace glm
|
||||
this->value[3] = v3;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
@@ -151,8 +149,7 @@ namespace glm
|
||||
this->value[3] = col_type(v4);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -236,8 +233,7 @@ namespace glm
|
||||
this->value[3] = col_type(0);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -281,8 +277,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Unary updatable operators
|
||||
// -- Unary updatable operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -373,6 +368,8 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator++()
|
||||
{
|
||||
@@ -393,8 +390,35 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Binary operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator++(int)
|
||||
{
|
||||
tmat4x3<T, P> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator--(int)
|
||||
{
|
||||
tmat4x3<T, P> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> const operator-(tmat4x3<T, P> const & m)
|
||||
{
|
||||
return tmat4x3<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2],
|
||||
-m[3]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> operator+(tmat4x3<T, P> const & m, T const & s)
|
||||
@@ -573,55 +597,7 @@ namespace glm
|
||||
s / m[3]);
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> const operator-(tmat4x3<T, P> const & m)
|
||||
{
|
||||
return tmat4x3<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2],
|
||||
-m[3]);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> const operator++(tmat4x3<T, P> const & m, int)
|
||||
{
|
||||
return tmat4x3<T, P>(
|
||||
m[0] + T(1),
|
||||
m[1] + T(1),
|
||||
m[2] + T(1),
|
||||
m[3] + T(1));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> const operator--(tmat4x3<T, P> const & m, int)
|
||||
{
|
||||
return tmat4x3<T, P>(
|
||||
m[0] - T(1),
|
||||
m[1] - T(1),
|
||||
m[2] - T(1),
|
||||
m[3] - T(1));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator++(int)
|
||||
{
|
||||
tmat4x3<T, P> Result(*this);
|
||||
++*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator--(int)
|
||||
{
|
||||
tmat4x3<T, P> Result(*this);
|
||||
--*this;
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tmat4x3<T, P> const & m1, tmat4x3<T, P> const & m2)
|
||||
|
||||
@@ -65,7 +65,8 @@ namespace glm
|
||||
col_type value[4];
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
GLM_FUNC_DECL tmat4x4() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
@@ -84,8 +85,7 @@ namespace glm
|
||||
col_type const & v2,
|
||||
col_type const & v3);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversions --
|
||||
|
||||
template <
|
||||
typename X1, typename Y1, typename Z1, typename W1,
|
||||
@@ -105,8 +105,7 @@ namespace glm
|
||||
tvec4<V3, P> const & v3,
|
||||
tvec4<V4, P> const & v4);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix conversions
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tmat4x4(tmat4x4<U, Q> const & m);
|
||||
@@ -120,8 +119,7 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tmat4x4(tmat3x4<T, P> const & x);
|
||||
GLM_FUNC_DECL explicit tmat4x4(tmat4x3<T, P> const & x);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -137,8 +135,7 @@ namespace glm
|
||||
GLM_FUNC_DECL col_type const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -161,8 +158,7 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> & operator/=(tmat4x4<U, P> const & m);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tmat4x4<T, P> & operator++();
|
||||
GLM_FUNC_DECL tmat4x4<T, P> & operator--();
|
||||
@@ -170,7 +166,13 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat4x4<T, P> operator--(int);
|
||||
};
|
||||
|
||||
// Binary operators
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> const operator-(tmat4x4<T, P> const & m);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> operator+(tmat4x4<T, P> const & m, T const & s);
|
||||
|
||||
@@ -225,9 +227,13 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> operator/(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
|
||||
|
||||
// Unary constant operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> const operator-(tmat4x4<T, P> const & m);
|
||||
GLM_FUNC_DECL bool operator==(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -92,8 +92,7 @@ namespace detail
|
||||
}
|
||||
}//namespace detail
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Constructors
|
||||
// -- Constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -185,8 +184,8 @@ namespace detail
|
||||
this->value[3] = col_type(m[3]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
// -- Conversions --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <
|
||||
typename X1, typename Y1, typename Z1, typename W1,
|
||||
@@ -248,8 +247,7 @@ namespace detail
|
||||
this->value[3] = col_type(v4);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Matrix convertion constructors
|
||||
// -- Matrix conversions --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat2x2<T, P> const & m)
|
||||
@@ -323,8 +321,7 @@ namespace detail
|
||||
this->value[3] = col_type(m[3], 1);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -368,8 +365,7 @@ namespace detail
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -478,6 +474,8 @@ namespace detail
|
||||
return (*this = *this * detail::compute_inverse<T, P>(m));
|
||||
}
|
||||
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator++()
|
||||
{
|
||||
@@ -514,7 +512,20 @@ namespace detail
|
||||
return Result;
|
||||
}
|
||||
|
||||
// Binary operators
|
||||
// -- Unary constant operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> const operator-(tmat4x4<T, P> const & m)
|
||||
{
|
||||
return tmat4x4<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2],
|
||||
-m[3]);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> operator+(tmat4x4<T, P> const & m, T const & s)
|
||||
{
|
||||
@@ -749,39 +760,7 @@ namespace detail
|
||||
return m1_copy /= m2;
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> const operator-(tmat4x4<T, P> const & m)
|
||||
{
|
||||
return tmat4x4<T, P>(
|
||||
-m[0],
|
||||
-m[1],
|
||||
-m[2],
|
||||
-m[3]);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> const operator++(tmat4x4<T, P> const & m, int)
|
||||
{
|
||||
return tmat4x4<T, P>(
|
||||
m[0] + static_cast<T>(1),
|
||||
m[1] + static_cast<T>(1),
|
||||
m[2] + static_cast<T>(1),
|
||||
m[3] + static_cast<T>(1));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> const operator--(tmat4x4<T, P> const & m, int)
|
||||
{
|
||||
return tmat4x4<T, P>(
|
||||
m[0] - static_cast<T>(1),
|
||||
m[1] - static_cast<T>(1),
|
||||
m[2] - static_cast<T>(1),
|
||||
m[3] - static_cast<T>(1));
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2)
|
||||
|
||||
@@ -168,7 +168,6 @@ namespace glm
|
||||
|
||||
/// @}
|
||||
|
||||
|
||||
/// @addtogroup core_precision
|
||||
/// @{
|
||||
|
||||
@@ -374,8 +373,7 @@ namespace glm
|
||||
/// @addtogroup core_types
|
||||
/// @{
|
||||
|
||||
//////////////////////////
|
||||
// Default float definition
|
||||
// -- Default float definition --
|
||||
|
||||
#if(defined(GLM_PRECISION_LOWP_FLOAT))
|
||||
typedef lowp_vec2 vec2;
|
||||
@@ -402,8 +400,7 @@ namespace glm
|
||||
typedef highp_vec4 vec4;
|
||||
#endif//GLM_PRECISION
|
||||
|
||||
//////////////////////////
|
||||
// Default double definition
|
||||
// -- Default double definition --
|
||||
|
||||
#if(defined(GLM_PRECISION_LOWP_DOUBLE))
|
||||
typedef lowp_dvec2 dvec2;
|
||||
@@ -418,21 +415,20 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_dvec2 dvec2;
|
||||
|
||||
|
||||
//! 3 components vector of double-precision floating-point numbers.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_dvec3 dvec3;
|
||||
|
||||
|
||||
//! 4 components vector of double-precision floating-point numbers.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_dvec4 dvec4;
|
||||
#endif//GLM_PRECISION
|
||||
|
||||
//////////////////////////
|
||||
// Signed integer definition
|
||||
|
||||
|
||||
// -- Signed integer definition --
|
||||
|
||||
#if(defined(GLM_PRECISION_LOWP_INT))
|
||||
typedef lowp_ivec2 ivec2;
|
||||
typedef lowp_ivec3 ivec3;
|
||||
@@ -442,25 +438,24 @@ namespace glm
|
||||
typedef mediump_ivec3 ivec3;
|
||||
typedef mediump_ivec4 ivec4;
|
||||
#else //defined(GLM_PRECISION_HIGHP_INT)
|
||||
//! 2 components vector of signed integer numbers.
|
||||
/// 2 components vector of signed integer numbers.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_ivec2 ivec2;
|
||||
|
||||
//! 3 components vector of signed integer numbers.
|
||||
|
||||
/// 3 components vector of signed integer numbers.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_ivec3 ivec3;
|
||||
|
||||
//! 4 components vector of signed integer numbers.
|
||||
|
||||
/// 4 components vector of signed integer numbers.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_ivec4 ivec4;
|
||||
#endif//GLM_PRECISION
|
||||
|
||||
//////////////////////////
|
||||
// Unsigned integer definition
|
||||
|
||||
|
||||
// -- Unsigned integer definition --
|
||||
|
||||
#if(defined(GLM_PRECISION_LOWP_UINT))
|
||||
typedef lowp_uvec2 uvec2;
|
||||
typedef lowp_uvec3 uvec3;
|
||||
@@ -474,20 +469,19 @@ namespace glm
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_uvec2 uvec2;
|
||||
|
||||
|
||||
/// 3 components vector of unsigned integer numbers.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_uvec3 uvec3;
|
||||
|
||||
|
||||
/// 4 components vector of unsigned integer numbers.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_uvec4 uvec4;
|
||||
#endif//GLM_PRECISION
|
||||
|
||||
//////////////////////////
|
||||
// Boolean definition
|
||||
|
||||
// -- Boolean definition --
|
||||
|
||||
#if(defined(GLM_PRECISION_LOWP_BOOL))
|
||||
typedef lowp_bvec2 bvec2;
|
||||
@@ -498,21 +492,21 @@ namespace glm
|
||||
typedef mediump_bvec3 bvec3;
|
||||
typedef mediump_bvec4 bvec4;
|
||||
#else //defined(GLM_PRECISION_HIGHP_BOOL)
|
||||
//! 2 components vector of boolean.
|
||||
/// 2 components vector of boolean.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_bvec2 bvec2;
|
||||
|
||||
//! 3 components vector of boolean.
|
||||
|
||||
/// 3 components vector of boolean.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_bvec3 bvec3;
|
||||
|
||||
//! 4 components vector of boolean.
|
||||
|
||||
/// 4 components vector of boolean.
|
||||
///
|
||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||
typedef highp_bvec4 bvec4;
|
||||
#endif//GLM_PRECISION
|
||||
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
||||
@@ -48,8 +48,7 @@ namespace glm
|
||||
template <typename T, precision P = defaultp>
|
||||
struct tvec1
|
||||
{
|
||||
//////////////////////////////////////
|
||||
// Implementation detail
|
||||
// -- Implementation detail --
|
||||
|
||||
typedef tvec1<T, P> type;
|
||||
typedef tvec1<bool, P> bool_type;
|
||||
@@ -60,8 +59,7 @@ namespace glm
|
||||
static GLM_RELAXED_CONSTEXPR precision prec = P;
|
||||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
// -- Data --
|
||||
|
||||
# if GLM_HAS_ANONYMOUS_UNION
|
||||
union
|
||||
@@ -90,8 +88,7 @@ namespace glm
|
||||
# endif//GLM_SWIZZLE*/
|
||||
# endif
|
||||
|
||||
//////////////////////////////////////
|
||||
// Accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
/// Return the count of components of the vector
|
||||
@@ -109,39 +106,35 @@ namespace glm
|
||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL tvec1() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tvec1(tvec1<T, P> const & v) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tvec1(tvec1<T, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL explicit tvec1(ctor);
|
||||
GLM_FUNC_DECL explicit tvec1(T const & s);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion vector constructors
|
||||
// -- Conversion vector constructors --
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec1(tvec2<U, Q> const & v);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec1(tvec3<U, Q> const & v);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec1(tvec4<U, Q> const & v);
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tvec1(tvec1<U, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
// -- Swizzle constructors --
|
||||
|
||||
# if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
|
||||
template <int E0>
|
||||
@@ -151,8 +144,7 @@ namespace glm
|
||||
}
|
||||
# endif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tvec1<T, P> & operator=(tvec1<T, P> const & v) GLM_DEFAULT;
|
||||
|
||||
@@ -175,16 +167,14 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tvec1<T, P> & operator/=(tvec1<U, P> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tvec1<T, P> & operator++();
|
||||
GLM_FUNC_DECL tvec1<T, P> & operator--();
|
||||
GLM_FUNC_DECL tvec1<T, P> operator++(int);
|
||||
GLM_FUNC_DECL tvec1<T, P> operator--(int);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary bit operators
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tvec1<T, P> & operator%=(U const & s);
|
||||
@@ -212,6 +202,12 @@ namespace glm
|
||||
GLM_FUNC_DECL tvec1<T, P> & operator>>=(tvec1<U, P> const & v);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v, T const & s);
|
||||
@@ -249,15 +245,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator==(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v, T const & s);
|
||||
|
||||
@@ -314,6 +301,14 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec1<T, P> operator~(tvec1<T, P> const & v);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator==(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -57,8 +56,7 @@ namespace glm
|
||||
: x(v.x)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(ctor)
|
||||
@@ -69,8 +67,7 @@ namespace glm
|
||||
: x(s)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion vector constructors
|
||||
// -- Conversion vector constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -96,8 +93,7 @@ namespace glm
|
||||
: x(static_cast<T>(v.x))
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -141,8 +137,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -225,8 +220,7 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator++()
|
||||
@@ -258,23 +252,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
|
||||
{
|
||||
return (v1.x == v2.x);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
|
||||
{
|
||||
return (v1.x != v2.x);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary bit operators
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
@@ -372,8 +350,16 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Binary arithmetic operators
|
||||
// -- Unary constant operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P> operator-(tvec1<T, P> const & v)
|
||||
{
|
||||
return tvec1<T, P>(
|
||||
-v.x);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P> operator+(tvec1<T, P> const & v, T const & s)
|
||||
@@ -418,7 +404,6 @@ namespace glm
|
||||
v1.x - v2.x);
|
||||
}
|
||||
|
||||
//operator*
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P> operator*(tvec1<T, P> const & v, T const & s)
|
||||
{
|
||||
@@ -440,7 +425,6 @@ namespace glm
|
||||
v1.x * v2.x);
|
||||
}
|
||||
|
||||
//operator/
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P> operator/(tvec1<T, P> const & v, T const & s)
|
||||
{
|
||||
@@ -462,30 +446,7 @@ namespace glm
|
||||
v1.x / v2.x);
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P> operator-(tvec1<T, P> const & v)
|
||||
{
|
||||
return tvec1<T, P>(
|
||||
-v.x);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P> operator++(tvec1<T, P> const & v, int)
|
||||
{
|
||||
return tvec1<T, P>(
|
||||
v.x + T(1));
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P> operator--(tvec1<T, P> const & v, int)
|
||||
{
|
||||
return tvec1<T, P>(
|
||||
v.x - T(1));
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Binary bit operators
|
||||
// -- Binary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P> operator%(tvec1<T, P> const & v, T const & s)
|
||||
@@ -619,4 +580,18 @@ namespace glm
|
||||
return tvec1<T, P>(
|
||||
~v.x);
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
|
||||
{
|
||||
return (v1.x == v2.x);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2)
|
||||
{
|
||||
return (v1.x != v2.x);
|
||||
}
|
||||
}//namespace glm
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//#include "../fwd.hpp"
|
||||
#include "type_vec.hpp"
|
||||
#ifdef GLM_SWIZZLE
|
||||
# if GLM_HAS_ANONYMOUS_UNION
|
||||
@@ -48,8 +47,7 @@ namespace glm
|
||||
template <typename T, precision P = defaultp>
|
||||
struct tvec2
|
||||
{
|
||||
//////////////////////////////////////
|
||||
// Implementation detail
|
||||
// -- Implementation detail --
|
||||
|
||||
typedef tvec2<T, P> type;
|
||||
typedef tvec2<bool, P> bool_type;
|
||||
@@ -60,8 +58,7 @@ namespace glm
|
||||
static GLM_RELAXED_CONSTEXPR precision prec = P;
|
||||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
// -- Data --
|
||||
|
||||
# if GLM_HAS_ANONYMOUS_UNION
|
||||
union
|
||||
@@ -91,8 +88,7 @@ namespace glm
|
||||
# endif//GLM_SWIZZLE
|
||||
# endif
|
||||
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
/// Return the count of components of the vector
|
||||
@@ -110,23 +106,20 @@ namespace glm
|
||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL tvec2() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tvec2(tvec2<T, P> const & v) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tvec2(tvec2<T, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL explicit tvec2(ctor);
|
||||
GLM_FUNC_DECL explicit tvec2(T const & s);
|
||||
GLM_FUNC_DECL tvec2(T const & s1, T const & s2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion constructors
|
||||
// -- Conversion constructors --
|
||||
|
||||
/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B>
|
||||
@@ -134,22 +127,20 @@ namespace glm
|
||||
template <typename A, typename B>
|
||||
GLM_FUNC_DECL tvec2(tvec1<A, P> const & v1, tvec1<B, P> const & v2);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion vector constructors
|
||||
// -- Conversion vector constructors --
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec2(tvec3<U, Q> const & v);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec2(tvec4<U, Q> const & v);
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tvec2(tvec2<U, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
// -- Swizzle constructors --
|
||||
|
||||
# if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
|
||||
template <int E0, int E1>
|
||||
@@ -159,8 +150,7 @@ namespace glm
|
||||
}
|
||||
# endif// GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tvec2<T, P>& operator=(tvec2<T, P> const & v) GLM_DEFAULT;
|
||||
|
||||
@@ -191,16 +181,14 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tvec2<T, P>& operator/=(tvec2<U, P> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tvec2<T, P> & operator++();
|
||||
GLM_FUNC_DECL tvec2<T, P> & operator--();
|
||||
GLM_FUNC_DECL tvec2<T, P> operator++(int);
|
||||
GLM_FUNC_DECL tvec2<T, P> operator--(int);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary bit operators
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tvec2<T, P> & operator%=(U s);
|
||||
@@ -240,6 +228,13 @@ namespace glm
|
||||
GLM_FUNC_DECL tvec2<T, P> & operator>>=(tvec2<U, P> const & v);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v, T const & s);
|
||||
|
||||
@@ -395,6 +390,14 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec2<T, P> operator~(tvec2<T, P> const & v);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator==(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tvec2<T, P> const & v1, tvec2<T, P> const & v2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -53,8 +52,7 @@ namespace glm
|
||||
: x(v.x), y(v.y)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(ctor)
|
||||
@@ -70,8 +68,7 @@ namespace glm
|
||||
: x(s1), y(s2)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion scalar constructors
|
||||
// -- Conversion scalar constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename A, typename B>
|
||||
@@ -87,8 +84,7 @@ namespace glm
|
||||
, y(static_cast<T>(b.x))
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion vector constructors
|
||||
// -- Conversion vector constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -111,8 +107,7 @@ namespace glm
|
||||
, y(static_cast<T>(v.y))
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -156,8 +151,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -286,8 +280,7 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator++()
|
||||
@@ -321,23 +314,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
|
||||
{
|
||||
return (v1.x == v2.x) && (v1.y == v2.y);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator!=(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
|
||||
{
|
||||
return (v1.x != v2.x) || (v1.y != v2.y);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary bit operators
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
@@ -501,8 +478,17 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Binary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P> operator-(tvec2<T, P> const & v)
|
||||
{
|
||||
return tvec2<T, P>(
|
||||
-v.x,
|
||||
-v.y);
|
||||
}
|
||||
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P> operator+(tvec2<T, P> const & v, T const & s)
|
||||
@@ -544,7 +530,6 @@ namespace glm
|
||||
v1.y + v2.y);
|
||||
}
|
||||
|
||||
//operator-
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P> operator-(tvec2<T, P> const & v, T const & s)
|
||||
{
|
||||
@@ -585,7 +570,6 @@ namespace glm
|
||||
v1.y - v2.y);
|
||||
}
|
||||
|
||||
//operator*
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P> operator*(tvec2<T, P> const & v1, T const & v2)
|
||||
{
|
||||
@@ -626,7 +610,6 @@ namespace glm
|
||||
v1.y * v2.y);
|
||||
}
|
||||
|
||||
//operator/
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P> operator/(tvec2<T, P> const & v, T const & s)
|
||||
{
|
||||
@@ -667,17 +650,7 @@ namespace glm
|
||||
v1.y / v2.y);
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P> operator-(tvec2<T, P> const & v)
|
||||
{
|
||||
return tvec2<T, P>(
|
||||
-v.x,
|
||||
-v.y);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Binary bit operators
|
||||
// -- Binary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P> operator%(tvec2<T, P> const & v, T const & s)
|
||||
@@ -926,4 +899,18 @@ namespace glm
|
||||
~v.x,
|
||||
~v.y);
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
|
||||
{
|
||||
return (v1.x == v2.x) && (v1.y == v2.y);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator!=(tvec2<T, P> const & v1, tvec2<T, P> const & v2)
|
||||
{
|
||||
return (v1.x != v2.x) || (v1.y != v2.y);
|
||||
}
|
||||
}//namespace glm
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//#include "../fwd.hpp"
|
||||
#include "type_vec.hpp"
|
||||
#ifdef GLM_SWIZZLE
|
||||
# if GLM_HAS_ANONYMOUS_UNION
|
||||
@@ -48,8 +47,7 @@ namespace glm
|
||||
template <typename T, precision P = defaultp>
|
||||
struct tvec3
|
||||
{
|
||||
//////////////////////////////////////
|
||||
// Implementation detail
|
||||
// -- Implementation detail --
|
||||
|
||||
typedef tvec3<T, P> type;
|
||||
typedef tvec3<bool, P> bool_type;
|
||||
@@ -60,8 +58,7 @@ namespace glm
|
||||
static GLM_RELAXED_CONSTEXPR precision prec = P;
|
||||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
// -- Data --
|
||||
|
||||
# if GLM_HAS_ANONYMOUS_UNION
|
||||
union
|
||||
@@ -92,8 +89,7 @@ namespace glm
|
||||
# endif//GLM_SWIZZLE
|
||||
# endif//GLM_LANG
|
||||
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
/// Return the count of components of the vector
|
||||
@@ -111,23 +107,20 @@ namespace glm
|
||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL tvec3() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tvec3(tvec3<T, P> const & v) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tvec3(tvec3<T, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL explicit tvec3(ctor);
|
||||
GLM_FUNC_DECL explicit tvec3(T const & s);
|
||||
GLM_FUNC_DECL tvec3(T const & a, T const & b, T const & c);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion scalar constructors
|
||||
// -- Conversion scalar constructors --
|
||||
|
||||
/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C>
|
||||
@@ -135,31 +128,29 @@ namespace glm
|
||||
template <typename A, typename B, typename C>
|
||||
GLM_FUNC_DECL tvec3(tvec1<A, P> const & a, tvec1<B, P> const & b, tvec1<C, P> const & c);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion vector constructors
|
||||
// -- Conversion vector constructors --
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec3(tvec2<A, Q> const & a, B const & b);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec3(tvec2<A, Q> const & a, tvec1<B, Q> const & b);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec3(A const & a, tvec2<B, Q> const & b);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec3(tvec1<A, Q> const & a, tvec2<B, Q> const & b);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec3(tvec4<U, Q> const & v);
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tvec3(tvec3<U, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
// -- Swizzle constructors --
|
||||
|
||||
# if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
|
||||
template <int E0, int E1, int E2>
|
||||
@@ -181,8 +172,7 @@ namespace glm
|
||||
}
|
||||
# endif// GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tvec3<T, P> & operator=(tvec3<T, P> const & v) GLM_DEFAULT;
|
||||
|
||||
@@ -213,16 +203,14 @@ namespace glm
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tvec3<T, P> & operator/=(tvec3<U, P> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tvec3<T, P> & operator++();
|
||||
GLM_FUNC_DECL tvec3<T, P> & operator--();
|
||||
GLM_FUNC_DECL tvec3<T, P> operator++(int);
|
||||
GLM_FUNC_DECL tvec3<T, P> operator--(int);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary bit operators
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tvec3<T, P> & operator%=(U s);
|
||||
@@ -262,6 +250,13 @@ namespace glm
|
||||
GLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec3<U, P> const & v);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s);
|
||||
|
||||
@@ -322,9 +317,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, T const & s);
|
||||
|
||||
@@ -417,6 +409,14 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec3<T, P> operator~(tvec3<T, P> const & v);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator==(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tvec3<T, P> const & v1, tvec3<T, P> const & v2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -57,8 +56,7 @@ namespace glm
|
||||
: x(v.x), y(v.y), z(v.z)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(ctor)
|
||||
@@ -74,8 +72,7 @@ namespace glm
|
||||
: x(a), y(b), z(c)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion scalar constructors
|
||||
// -- Conversion scalar constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename A, typename B, typename C>
|
||||
@@ -93,8 +90,7 @@ namespace glm
|
||||
z(static_cast<T>(c))
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion vector constructors
|
||||
// -- Conversion vector constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename A, typename B, precision Q>
|
||||
@@ -144,8 +140,7 @@ namespace glm
|
||||
z(static_cast<T>(v.z))
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -189,8 +184,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -333,8 +327,7 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator++()
|
||||
@@ -370,8 +363,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary bit operators
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
@@ -553,23 +545,18 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator-(tvec3<T, P> const & v)
|
||||
{
|
||||
return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z);
|
||||
return tvec3<T, P>(
|
||||
-v.x,
|
||||
-v.y,
|
||||
-v.z);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator!=(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
|
||||
{
|
||||
return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Binary arithmetic operators
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s)
|
||||
@@ -616,7 +603,6 @@ namespace glm
|
||||
v1.z + v2.z);
|
||||
}
|
||||
|
||||
//operator-
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator-(tvec3<T, P> const & v, T const & s)
|
||||
{
|
||||
@@ -662,7 +648,6 @@ namespace glm
|
||||
v1.z - v2.z);
|
||||
}
|
||||
|
||||
//operator*
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec3<T, P> const & v, T const & s)
|
||||
{
|
||||
@@ -708,7 +693,6 @@ namespace glm
|
||||
v1.z * v2.z);
|
||||
}
|
||||
|
||||
//operator/
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator/(tvec3<T, P> const & v, T const & s)
|
||||
{
|
||||
@@ -754,18 +738,7 @@ namespace glm
|
||||
v1.z / v2.z);
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator-(tvec3<T, P> const & v)
|
||||
{
|
||||
return tvec3<T, P>(
|
||||
-v.x,
|
||||
-v.y,
|
||||
-v.z);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Binary bit operators
|
||||
// -- Binary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator%(tvec3<T, P> const & v, T const & s)
|
||||
@@ -1045,4 +1018,18 @@ namespace glm
|
||||
~v.y,
|
||||
~v.z);
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
|
||||
{
|
||||
return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator!=(tvec3<T, P> const & v1, tvec3<T, P> const & v2)
|
||||
{
|
||||
return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z);
|
||||
}
|
||||
}//namespace glm
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//#include "../fwd.hpp"
|
||||
#include "setup.hpp"
|
||||
#include "type_vec.hpp"
|
||||
#ifdef GLM_SWIZZLE
|
||||
@@ -102,8 +101,7 @@ namespace detail
|
||||
template <typename T, precision P = defaultp>
|
||||
struct tvec4
|
||||
{
|
||||
//////////////////////////////////////
|
||||
// Implementation detail
|
||||
// -- Implementation detail --
|
||||
|
||||
typedef tvec4<T, P> type;
|
||||
typedef tvec4<bool, P> bool_type;
|
||||
@@ -114,8 +112,7 @@ namespace detail
|
||||
static GLM_RELAXED_CONSTEXPR precision prec = P;
|
||||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
//////////////////////////////////////
|
||||
// Data
|
||||
// -- Data --
|
||||
|
||||
# if GLM_HAS_ANONYMOUS_UNION
|
||||
union
|
||||
@@ -149,8 +146,7 @@ namespace detail
|
||||
# endif//GLM_SWIZZLE
|
||||
# endif//GLM_LANG
|
||||
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
/// Return the count of components of the vector
|
||||
@@ -168,23 +164,20 @@ namespace detail
|
||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL tvec4() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tvec4(tvec4<T, P> const & v) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL explicit tvec4(ctor);
|
||||
GLM_FUNC_DECL explicit tvec4(T s);
|
||||
GLM_FUNC_DECL tvec4(T a, T b, T c, T d);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion scalar constructors
|
||||
// -- Conversion scalar constructors --
|
||||
|
||||
/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, typename D>
|
||||
@@ -192,49 +185,47 @@ namespace detail
|
||||
template <typename A, typename B, typename C, typename D>
|
||||
GLM_FUNC_DECL tvec4(tvec1<A, P> const & a, tvec1<B, P> const & b, tvec1<C, P> const & c, tvec1<D, P> const & d);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion vector constructors
|
||||
// -- Conversion vector constructors --
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & a, B b, C c);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & a, tvec1<B, Q> const & b, tvec1<C, Q> const & c);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(A a, tvec2<B, Q> const & b, C c);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec1<A, Q> const & a, tvec2<B, Q> const & b, tvec1<C, Q> const & c);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(A a, B b, tvec2<C, Q> const & c);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, typename C, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec1<A, Q> const & a, tvec1<B, Q> const & b, tvec2<C, Q> const & c);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec3<A, Q> const & a, B b);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec3<A, Q> const & a, tvec1<B, Q> const & b);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(A a, tvec3<B, Q> const & b);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec1<A, Q> const & a, tvec3<B, Q> const & b);
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename A, typename B, precision Q>
|
||||
GLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & a, tvec2<B, Q> const & b);
|
||||
|
||||
//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tvec4(tvec4<U, Q> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Swizzle constructors
|
||||
// -- Swizzle constructors --
|
||||
|
||||
# if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
|
||||
template <int E0, int E1, int E2, int E3>
|
||||
@@ -280,8 +271,7 @@ namespace detail
|
||||
}
|
||||
# endif// GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<T, P> const & v) GLM_DEFAULT;
|
||||
|
||||
@@ -312,16 +302,14 @@ namespace detail
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tvec4<T, P> & operator/=(tvec4<U, P> const & v);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
GLM_FUNC_DECL tvec4<T, P> & operator++();
|
||||
GLM_FUNC_DECL tvec4<T, P> & operator--();
|
||||
GLM_FUNC_DECL tvec4<T, P> operator++(int);
|
||||
GLM_FUNC_DECL tvec4<T, P> operator--(int);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary bit operators
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tvec4<T, P> & operator%=(U scalar);
|
||||
@@ -361,6 +349,13 @@ namespace detail
|
||||
GLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec4<U, P> const & v);
|
||||
};
|
||||
|
||||
// -- Unary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, T scalar);
|
||||
|
||||
@@ -421,9 +416,6 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
|
||||
|
||||
@@ -522,6 +514,14 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec4<T, P> operator~(tvec4<T, P> const & v);
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2);
|
||||
}//namespace glm
|
||||
|
||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -57,8 +56,7 @@ namespace glm
|
||||
: x(v.x), y(v.y), z(v.z), w(v.w)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(ctor)
|
||||
@@ -74,8 +72,7 @@ namespace glm
|
||||
: x(a), y(b), z(c), w(d)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion scalar constructors
|
||||
// -- Conversion scalar constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename A, typename B, typename C, typename D>
|
||||
@@ -95,8 +92,7 @@ namespace glm
|
||||
w(static_cast<T>(d.x))
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversion vector constructors
|
||||
// -- Conversion vector constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename A, typename B, typename C, precision Q>
|
||||
@@ -206,8 +202,7 @@ namespace glm
|
||||
w(static_cast<T>(v.w))
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -251,8 +246,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary arithmetic operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -411,8 +405,7 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Increment and decrement operators
|
||||
// -- Increment and decrement operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator++()
|
||||
@@ -450,8 +443,7 @@ namespace glm
|
||||
return Result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Unary bit operators
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U>
|
||||
@@ -651,149 +643,9 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Unary constant operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Binary arithmetic operators
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v, T scalar)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v.x + scalar,
|
||||
v.y + scalar,
|
||||
v.z + scalar,
|
||||
v.w + scalar);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator+(T scalar, tvec4<T, P> const & v)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
scalar + v.x,
|
||||
scalar + v.y,
|
||||
scalar + v.z,
|
||||
scalar + v.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v1.x + v2.x,
|
||||
v1.y + v2.y,
|
||||
v1.z + v2.z,
|
||||
v1.w + v2.w);
|
||||
}
|
||||
|
||||
//operator-
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v, T scalar)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v.x - scalar,
|
||||
v.y - scalar,
|
||||
v.z - scalar,
|
||||
v.w - scalar);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator-(T scalar, tvec4<T, P> const & v)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
scalar - v.x,
|
||||
scalar - v.y,
|
||||
scalar - v.z,
|
||||
scalar - v.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v1.x - v2.x,
|
||||
v1.y - v2.y,
|
||||
v1.z - v2.z,
|
||||
v1.w - v2.w);
|
||||
}
|
||||
|
||||
//operator*
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, T scalar)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v.x * scalar,
|
||||
v.y * scalar,
|
||||
v.z * scalar,
|
||||
v.w * scalar);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(T scalar, tvec4<T, P> const & v)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
scalar * v.x,
|
||||
scalar * v.y,
|
||||
scalar * v.z,
|
||||
scalar * v.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v1.x * v2.x,
|
||||
v1.y * v2.y,
|
||||
v1.z * v2.z,
|
||||
v1.w * v2.w);
|
||||
}
|
||||
|
||||
//operator/
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v, T scalar)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v.x / scalar,
|
||||
v.y / scalar,
|
||||
v.z / scalar,
|
||||
v.w / scalar);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(T scalar, tvec4<T, P> const & v)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
scalar / v.x,
|
||||
scalar / v.y,
|
||||
scalar / v.z,
|
||||
scalar / v.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v1.x / v2.x,
|
||||
v1.y / v2.y,
|
||||
v1.z / v2.z,
|
||||
v1.w / v2.w);
|
||||
}
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
@@ -803,8 +655,129 @@ namespace glm
|
||||
-v.w);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Binary bit operators
|
||||
// -- Binary arithmetic operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v, T scalar)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v.x + scalar,
|
||||
v.y + scalar,
|
||||
v.z + scalar,
|
||||
v.w + scalar);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator+(T scalar, tvec4<T, P> const & v)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
scalar + v.x,
|
||||
scalar + v.y,
|
||||
scalar + v.z,
|
||||
scalar + v.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v1.x + v2.x,
|
||||
v1.y + v2.y,
|
||||
v1.z + v2.z,
|
||||
v1.w + v2.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v, T scalar)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v.x - scalar,
|
||||
v.y - scalar,
|
||||
v.z - scalar,
|
||||
v.w - scalar);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator-(T scalar, tvec4<T, P> const & v)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
scalar - v.x,
|
||||
scalar - v.y,
|
||||
scalar - v.z,
|
||||
scalar - v.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v1.x - v2.x,
|
||||
v1.y - v2.y,
|
||||
v1.z - v2.z,
|
||||
v1.w - v2.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, T scalar)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v.x * scalar,
|
||||
v.y * scalar,
|
||||
v.z * scalar,
|
||||
v.w * scalar);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(T scalar, tvec4<T, P> const & v)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
scalar * v.x,
|
||||
scalar * v.y,
|
||||
scalar * v.z,
|
||||
scalar * v.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v1.x * v2.x,
|
||||
v1.y * v2.y,
|
||||
v1.z * v2.z,
|
||||
v1.w * v2.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v, T scalar)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v.x / scalar,
|
||||
v.y / scalar,
|
||||
v.z / scalar,
|
||||
v.w / scalar);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(T scalar, tvec4<T, P> const & v)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
scalar / v.x,
|
||||
scalar / v.y,
|
||||
scalar / v.z,
|
||||
scalar / v.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return tvec4<T, P>(
|
||||
v1.x / v2.x,
|
||||
v1.y / v2.y,
|
||||
v1.z / v2.z,
|
||||
v1.w / v2.w);
|
||||
}
|
||||
|
||||
// -- Binary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec4<T, P> const & v, T s)
|
||||
@@ -1115,6 +1088,20 @@ namespace glm
|
||||
~v.z,
|
||||
~v.w);
|
||||
}
|
||||
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w);
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2)
|
||||
{
|
||||
return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w);
|
||||
}
|
||||
}//namespace glm
|
||||
|
||||
#if GLM_HAS_ANONYMOUS_UNION && GLM_NOT_BUGGY_VC32BITS
|
||||
|
||||
40
glm/fwd.hpp
40
glm/fwd.hpp
@@ -124,9 +124,6 @@ namespace glm
|
||||
// GLM_GTC_precision
|
||||
namespace glm
|
||||
{
|
||||
/// @addtogroup gtc_type_precision
|
||||
/// @{
|
||||
|
||||
/// Low precision 8 bit signed integer type.
|
||||
/// @see gtc_type_precision
|
||||
typedef detail::int8 lowp_int8;
|
||||
@@ -1547,15 +1544,15 @@ namespace glm
|
||||
typedef tvec1<float, lowp> lowp_vec1;
|
||||
|
||||
/// Low single-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec2<float, lowp> lowp_vec2;
|
||||
|
||||
/// Low single-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec3<float, lowp> lowp_vec3;
|
||||
|
||||
/// Low single-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec4<float, lowp> lowp_vec4;
|
||||
|
||||
/// Low single-precision floating-point vector of 1 component.
|
||||
@@ -1580,15 +1577,15 @@ namespace glm
|
||||
typedef tvec1<float, mediump> mediump_vec1;
|
||||
|
||||
/// Medium Single-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec2<float, mediump> mediump_vec2;
|
||||
|
||||
/// Medium Single-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec3<float, mediump> mediump_vec3;
|
||||
|
||||
/// Medium Single-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec4<float, mediump> mediump_vec4;
|
||||
|
||||
/// Medium single-precision floating-point vector of 1 component.
|
||||
@@ -1613,15 +1610,15 @@ namespace glm
|
||||
typedef tvec1<float, highp> highp_vec1;
|
||||
|
||||
/// High Single-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec2<float, highp> highp_vec2;
|
||||
|
||||
/// High Single-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec3<float, highp> highp_vec3;
|
||||
|
||||
/// High Single-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec4<float, highp> highp_vec4;
|
||||
|
||||
/// High single-precision floating-point vector of 1 component.
|
||||
@@ -1629,15 +1626,15 @@ namespace glm
|
||||
typedef tvec1<float, highp> highp_fvec1;
|
||||
|
||||
/// High Single-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec2<float, highp> highp_fvec2;
|
||||
|
||||
/// High Single-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec3<float, highp> highp_fvec3;
|
||||
|
||||
/// High Single-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec4<float, highp> highp_fvec4;
|
||||
|
||||
|
||||
@@ -1646,15 +1643,15 @@ namespace glm
|
||||
typedef tvec1<f32, lowp> lowp_f32vec1;
|
||||
|
||||
/// Low single-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec2<f32, lowp> lowp_f32vec2;
|
||||
|
||||
/// Low single-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec3<f32, lowp> lowp_f32vec3;
|
||||
|
||||
/// Low single-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec4<f32, lowp> lowp_f32vec4;
|
||||
|
||||
/// Medium single-precision floating-point vector of 1 component.
|
||||
@@ -1662,15 +1659,15 @@ namespace glm
|
||||
typedef tvec1<f32, mediump> mediump_f32vec1;
|
||||
|
||||
/// Medium single-precision floating-point vector of 2 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec2<f32, mediump> mediump_f32vec2;
|
||||
|
||||
/// Medium single-precision floating-point vector of 3 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec3<f32, mediump> mediump_f32vec3;
|
||||
|
||||
/// Medium single-precision floating-point vector of 4 components.
|
||||
/// @see gtc_type_precision
|
||||
/// @see core_precision
|
||||
typedef tvec4<f32, mediump> mediump_f32vec4;
|
||||
|
||||
/// High single-precision floating-point vector of 1 component.
|
||||
@@ -2598,4 +2595,5 @@ namespace glm
|
||||
/// @see gtc_type_precision
|
||||
typedef highp_f64quat f64quat;
|
||||
#endif
|
||||
|
||||
}//namespace glm
|
||||
|
||||
@@ -62,6 +62,8 @@ namespace glm
|
||||
template <typename T, precision P = defaultp>
|
||||
struct tquat
|
||||
{
|
||||
// -- Implementation detail --
|
||||
|
||||
typedef tquat<T, P> type;
|
||||
typedef T value_type;
|
||||
|
||||
@@ -70,11 +72,11 @@ namespace glm
|
||||
static GLM_RELAXED_CONSTEXPR precision prec = P;
|
||||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
public:
|
||||
// -- Data --
|
||||
|
||||
T x, y, z, w;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -92,28 +94,25 @@ namespace glm
|
||||
GLM_FUNC_DECL T const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL tquat() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tquat(tquat<T, P> const & q) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tquat(tquat<T, Q> const & q);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL explicit tquat(ctor);
|
||||
GLM_FUNC_DECL explicit tquat(T const & s, tvec3<T, P> const & v);
|
||||
GLM_FUNC_DECL tquat(T const & w, T const & x, T const & y, T const & z);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tquat(tquat<U, Q> const & q);
|
||||
|
||||
// explicit conversion operators
|
||||
/// Explicit conversion operators
|
||||
# if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
|
||||
GLM_FUNC_DECL explicit operator tmat3x3<T, P>();
|
||||
GLM_FUNC_DECL explicit operator tmat4x4<T, P>();
|
||||
@@ -132,8 +131,7 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tquat(tmat3x3<T, P> const & m);
|
||||
GLM_FUNC_DECL explicit tquat(tmat4x4<T, P> const & m);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tquat<T, P> & operator=(tquat<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
@@ -149,9 +147,13 @@ namespace glm
|
||||
GLM_FUNC_DECL tquat<T, P> & operator/=(U s);
|
||||
};
|
||||
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tquat<T, P> operator-(tquat<T, P> const & q);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tquat<T, P> operator+(tquat<T, P> const & q, tquat<T, P> const & p);
|
||||
|
||||
|
||||
@@ -49,8 +49,7 @@ namespace detail
|
||||
};
|
||||
}//namespace detail
|
||||
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -94,8 +93,7 @@ namespace detail
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -119,8 +117,7 @@ namespace detail
|
||||
: x(q.x), y(q.y), z(q.z), w(q.w)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(ctor)
|
||||
@@ -136,8 +133,7 @@ namespace detail
|
||||
: x(x), y(y), z(z), w(w)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Conversions
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -226,8 +222,7 @@ namespace detail
|
||||
return conjugate(q) / dot(q, q);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// tquat<valType> operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -299,8 +294,7 @@ namespace detail
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// tquat<T, P> external operators
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P> operator-(tquat<T, P> const & q)
|
||||
@@ -308,6 +302,8 @@ namespace detail
|
||||
return tquat<T, P>(-q.w, -q.x, -q.y, -q.z);
|
||||
}
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P> operator+(tquat<T, P> const & q, tquat<T, P> const & p)
|
||||
{
|
||||
@@ -320,7 +316,6 @@ namespace detail
|
||||
return tquat<T, P>(q) *= p;
|
||||
}
|
||||
|
||||
// Transformation
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tquat<T, P> const & q, tvec3<T, P> const & v)
|
||||
{
|
||||
@@ -369,8 +364,7 @@ namespace detail
|
||||
q.w / s, q.x / s, q.y / s, q.z / s);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tquat<T, P> const & q1, tquat<T, P> const & q2)
|
||||
@@ -384,7 +378,8 @@ namespace detail
|
||||
return (q1.x != q2.x) || (q1.y != q2.y) || (q1.z != q2.z) || (q1.w != q2.w);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// -- Operations --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T length(tquat<T, P> const & q)
|
||||
{
|
||||
|
||||
@@ -61,6 +61,8 @@ namespace glm
|
||||
template <typename T, precision P = defaultp>
|
||||
struct tdualquat
|
||||
{
|
||||
// -- Implementation detail --
|
||||
|
||||
typedef T value_type;
|
||||
typedef glm::tquat<T, P> part_type;
|
||||
|
||||
@@ -69,11 +71,11 @@ namespace glm
|
||||
static GLM_RELAXED_CONSTEXPR precision prec = P;
|
||||
# endif//GLM_META_PROG_HELPERS
|
||||
|
||||
public:
|
||||
// -- Data --
|
||||
|
||||
glm::tquat<T, P> real, dual;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
typedef size_t size_type;
|
||||
@@ -91,24 +93,21 @@ namespace glm
|
||||
GLM_FUNC_DECL part_type const & operator[](length_type i) const;
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL tdualquat() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL tdualquat(tdualquat<T, P> const & d) GLM_DEFAULT;
|
||||
template <precision Q>
|
||||
GLM_FUNC_DECL tdualquat(tdualquat<T, Q> const & d);
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL explicit tdualquat(ctor);
|
||||
GLM_FUNC_DECL explicit tdualquat(tquat<T, P> const & real);
|
||||
GLM_FUNC_DECL tdualquat(tquat<T, P> const & orientation, tvec3<T, P> const & translation);
|
||||
GLM_FUNC_DECL tdualquat(tquat<T, P> const & real, tquat<T, P> const & dual);
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// tdualquat conversions
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename U, precision Q>
|
||||
GLM_FUNC_DECL GLM_EXPLICIT tdualquat(tdualquat<U, Q> const & q);
|
||||
@@ -116,7 +115,8 @@ namespace glm
|
||||
GLM_FUNC_DECL explicit tdualquat(tmat2x4<T, P> const & holder_mat);
|
||||
GLM_FUNC_DECL explicit tdualquat(tmat3x4<T, P> const & aug_mat);
|
||||
|
||||
// Operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
GLM_FUNC_DECL tdualquat<T, P> & operator=(tdualquat<T, P> const & m) GLM_DEFAULT;
|
||||
|
||||
template <typename U>
|
||||
@@ -127,105 +127,81 @@ namespace glm
|
||||
GLM_FUNC_DECL tdualquat<T, P> & operator/=(U s);
|
||||
};
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tquat<T, P> operator- (
|
||||
tquat<T, P> const & q);
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> operator+ (
|
||||
tdualquat<T, P> const & q,
|
||||
tdualquat<T, P> const & p);
|
||||
GLM_FUNC_DECL tquat<T, P> operator-(tquat<T, P> const & q);
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> operator* (
|
||||
tdualquat<T, P> const & q,
|
||||
tdualquat<T, P> const & p);
|
||||
GLM_FUNC_DECL tdualquat<T, P> operator+(tdualquat<T, P> const & q, tdualquat<T, P> const & p);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec3<T, P> operator* (
|
||||
tquat<T, P> const & q,
|
||||
tvec3<T, P> const & v);
|
||||
GLM_FUNC_DECL tdualquat<T, P> operator*(tdualquat<T, P> const & q, tdualquat<T, P> const & p);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec3<T, P> operator* (
|
||||
tvec3<T, P> const & v,
|
||||
tquat<T, P> const & q);
|
||||
GLM_FUNC_DECL tvec3<T, P> operator*(tquat<T, P> const & q, tvec3<T, P> const & v);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec4<T, P> operator* (
|
||||
tquat<T, P> const & q,
|
||||
tvec4<T, P> const & v);
|
||||
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, tquat<T, P> const & q);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tvec4<T, P> operator* (
|
||||
tvec4<T, P> const & v,
|
||||
tquat<T, P> const & q);
|
||||
GLM_FUNC_DECL tvec4<T, P> operator*(tquat<T, P> const & q, tvec4<T, P> const & v);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> operator* (
|
||||
tdualquat<T, P> const & q,
|
||||
T const & s);
|
||||
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, tquat<T, P> const & q);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> operator* (
|
||||
T const & s,
|
||||
tdualquat<T, P> const & q);
|
||||
GLM_FUNC_DECL tdualquat<T, P> operator*(tdualquat<T, P> const & q, T const & s);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> operator/ (
|
||||
tdualquat<T, P> const & q,
|
||||
T const & s);
|
||||
GLM_FUNC_DECL tdualquat<T, P> operator*(T const & s, tdualquat<T, P> const & q);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> operator/(tdualquat<T, P> const & q, T const & s);
|
||||
|
||||
/// Returns the normalized quaternion.
|
||||
///
|
||||
/// @see gtx_dual_quaternion
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> normalize(
|
||||
tdualquat<T, P> const & q);
|
||||
GLM_FUNC_DECL tdualquat<T, P> normalize(tdualquat<T, P> const & q);
|
||||
|
||||
/// Returns the linear interpolation of two dual quaternion.
|
||||
///
|
||||
/// @see gtc_dual_quaternion
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> lerp(
|
||||
tdualquat<T, P> const & x,
|
||||
tdualquat<T, P> const & y,
|
||||
T const & a);
|
||||
GLM_FUNC_DECL tdualquat<T, P> lerp(tdualquat<T, P> const & x, tdualquat<T, P> const & y, T const & a);
|
||||
|
||||
/// Returns the q inverse.
|
||||
///
|
||||
/// @see gtx_dual_quaternion
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> inverse(
|
||||
tdualquat<T, P> const & q);
|
||||
GLM_FUNC_DECL tdualquat<T, P> inverse(tdualquat<T, P> const & q);
|
||||
|
||||
/// Converts a quaternion to a 2 * 4 matrix.
|
||||
///
|
||||
/// @see gtx_dual_quaternion
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> mat2x4_cast(
|
||||
tdualquat<T, P> const & x);
|
||||
GLM_FUNC_DECL tmat2x4<T, P> mat2x4_cast(tdualquat<T, P> const & x);
|
||||
|
||||
/// Converts a quaternion to a 3 * 4 matrix.
|
||||
///
|
||||
/// @see gtx_dual_quaternion
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> mat3x4_cast(
|
||||
tdualquat<T, P> const & x);
|
||||
GLM_FUNC_DECL tmat3x4<T, P> mat3x4_cast(tdualquat<T, P> const & x);
|
||||
|
||||
/// Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion.
|
||||
///
|
||||
/// @see gtx_dual_quaternion
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> dualquat_cast(
|
||||
tmat2x4<T, P> const & x);
|
||||
GLM_FUNC_DECL tdualquat<T, P> dualquat_cast(tmat2x4<T, P> const & x);
|
||||
|
||||
/// Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion.
|
||||
///
|
||||
/// @see gtx_dual_quaternion
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tdualquat<T, P> dualquat_cast(
|
||||
tmat3x4<T, P> const & x);
|
||||
GLM_FUNC_DECL tdualquat<T, P> dualquat_cast(tmat3x4<T, P> const & x);
|
||||
|
||||
|
||||
/// Dual-quaternion of low single-precision floating-point numbers.
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
//////////////////////////////////////
|
||||
// Component accesses
|
||||
// -- Component accesses --
|
||||
|
||||
# ifdef GLM_FORCE_SIZE_FUNC
|
||||
template <typename T, precision P>
|
||||
@@ -80,8 +79,7 @@ namespace glm
|
||||
}
|
||||
# endif//GLM_FORCE_SIZE_FUNC
|
||||
|
||||
//////////////////////////////////////
|
||||
// Implicit basic constructors
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
template <typename T, precision P>
|
||||
@@ -108,8 +106,7 @@ namespace glm
|
||||
, dual(d.dual)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Explicit basic constructors
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(ctor)
|
||||
@@ -134,8 +131,7 @@ namespace glm
|
||||
: real(r), dual(d)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// tdualquat conversions
|
||||
// -- Conversion constructors --
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename U, precision Q>
|
||||
@@ -156,8 +152,7 @@ namespace glm
|
||||
*this = dualquat_cast(m);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// tdualquat operators
|
||||
// -- Unary arithmetic operators --
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
template <typename T, precision P>
|
||||
@@ -196,8 +191,7 @@ namespace glm
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// tquat<valType> external operators
|
||||
// -- Unary bit operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P> operator-(tdualquat<T, P> const & q)
|
||||
@@ -205,6 +199,8 @@ namespace glm
|
||||
return tdualquat<T, P>(-q.real,-q.dual);
|
||||
}
|
||||
|
||||
// -- Binary operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P> operator+(tdualquat<T, P> const & q, tdualquat<T, P> const & p)
|
||||
{
|
||||
@@ -217,7 +213,6 @@ namespace glm
|
||||
return tdualquat<T, P>(p.real * o.real,p.real * o.dual + p.dual * o.real);
|
||||
}
|
||||
|
||||
// Transformation
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tdualquat<T, P> const & q, tvec3<T, P> const & v)
|
||||
{
|
||||
@@ -262,8 +257,8 @@ namespace glm
|
||||
return tdualquat<T, P>(q.real / s, q.dual / s);
|
||||
}
|
||||
|
||||
//////////////////////////////////////
|
||||
// Boolean operators
|
||||
// -- Boolean operators --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tdualquat<T, P> const & q1, tdualquat<T, P> const & q2)
|
||||
{
|
||||
@@ -276,7 +271,8 @@ namespace glm
|
||||
return (q1.real != q2.dual) || (q1.real != q2.dual);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// -- Operations --
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P> normalize(tdualquat<T, P> const & q)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user