mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Add static rows, cols, prec, and components fields to all matrix types
This commit is contained in:
parent
5d05c8c1f7
commit
38f63d3943
@ -8,14 +8,14 @@
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -54,11 +54,23 @@ namespace glm
|
||||
template <typename U, precision Q>
|
||||
friend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);
|
||||
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static GLM_CONSTEXPR length_t components = 2;
|
||||
static GLM_CONSTEXPR length_t cols = 2;
|
||||
static GLM_CONSTEXPR length_t rows = 2;
|
||||
static GLM_CONSTEXPR precision prec = P;
|
||||
# else
|
||||
static const length_t components = 2;
|
||||
static const length_t cols = 2;
|
||||
static const length_t rows = 2;
|
||||
static const precision prec = P;
|
||||
# endif
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[2];
|
||||
/// @endcond
|
||||
|
||||
|
||||
public:
|
||||
//////////////////////////////////////
|
||||
// Constructors
|
||||
@ -130,23 +142,23 @@ namespace glm
|
||||
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & v);
|
||||
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator+=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator+=(tmat2x2<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator-=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator-=(tmat2x2<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator*=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator*=(tmat2x2<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator/=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> & operator/=(tmat2x2<U, P> const & m);
|
||||
|
||||
//////////////////////////////////////
|
||||
@ -191,10 +203,10 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat3x2<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat2x2<T, P> const & m1, tmat4x2<T, P> const & m2);
|
||||
|
||||
@ -214,7 +226,7 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat2x2<T, P> operator/(tmat2x2<T, P> const & m1, tmat2x2<T, P> const & m2);
|
||||
|
||||
// Unary constant operators
|
||||
template <typename T, precision P>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> const operator-(tmat2x2<T, P> const & m);
|
||||
} //namespace glm
|
||||
|
||||
|
@ -8,14 +8,14 @@
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -50,11 +50,23 @@ namespace glm
|
||||
typedef tmat3x2<T, P> transpose_type;
|
||||
typedef T value_type;
|
||||
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static GLM_CONSTEXPR length_t components = 2;
|
||||
static GLM_CONSTEXPR length_t cols = 3;
|
||||
static GLM_CONSTEXPR length_t rows = 2;
|
||||
static GLM_CONSTEXPR precision prec = P;
|
||||
# else
|
||||
static const length_t components = 2;
|
||||
static const length_t cols = 3;
|
||||
static const length_t rows = 2;
|
||||
static const precision prec = P;
|
||||
# endif
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
/// @cond DETAIL
|
||||
col_type value[2];
|
||||
/// @endcond
|
||||
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat2x3();
|
||||
@ -78,7 +90,7 @@ namespace glm
|
||||
GLM_FUNC_DECL tmat2x3(
|
||||
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||
X2 const & x2, Y2 const & y2, Z2 const & z2);
|
||||
|
||||
|
||||
template <typename U, typename V>
|
||||
GLM_FUNC_DECL tmat2x3(
|
||||
tvec3<U, P> const & v1,
|
||||
@ -126,19 +138,19 @@ namespace glm
|
||||
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m);
|
||||
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator+=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator+=(tmat2x3<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator-=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator-=(tmat2x3<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator*=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
@ -181,7 +193,7 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat3x2<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat4x2<T, P> const & m2);
|
||||
|
||||
|
@ -8,14 +8,14 @@
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -50,11 +50,23 @@ namespace glm
|
||||
typedef tmat4x2<T, P> transpose_type;
|
||||
typedef T value_type;
|
||||
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static GLM_CONSTEXPR length_t components = 2;
|
||||
static GLM_CONSTEXPR length_t cols = 4;
|
||||
static GLM_CONSTEXPR length_t rows = 2;
|
||||
static GLM_CONSTEXPR precision prec = P;
|
||||
# else
|
||||
static const length_t components = 2;
|
||||
static const length_t cols = 4;
|
||||
static const length_t rows = 2;
|
||||
static const precision prec = P;
|
||||
# endif
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[2];
|
||||
/// @endcond
|
||||
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat2x4();
|
||||
@ -68,7 +80,7 @@ namespace glm
|
||||
T const & x0, T const & y0, T const & z0, T const & w0,
|
||||
T const & x1, T const & y1, T const & z1, T const & w1);
|
||||
GLM_FUNC_DECL tmat2x4(
|
||||
col_type const & v0,
|
||||
col_type const & v0,
|
||||
col_type const & v1);
|
||||
|
||||
//////////////////////////////////////
|
||||
@ -127,19 +139,19 @@ namespace glm
|
||||
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m);
|
||||
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator+=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator+=(tmat2x4<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator-=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator-=(tmat2x4<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator*=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
@ -179,7 +191,7 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat4x2<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat2x2<T, P> const & m2);
|
||||
|
||||
@ -189,7 +201,7 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, T s);
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> operator/(T s, tmat2x4<T, P> const & m);
|
||||
|
||||
// Unary constant operators
|
||||
|
@ -8,14 +8,14 @@
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -50,11 +50,23 @@ namespace glm
|
||||
typedef tmat2x3<T, P> transpose_type;
|
||||
typedef T value_type;
|
||||
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static GLM_CONSTEXPR length_t components = 3;
|
||||
static GLM_CONSTEXPR length_t cols = 2;
|
||||
static GLM_CONSTEXPR length_t rows = 3;
|
||||
static GLM_CONSTEXPR precision prec = P;
|
||||
# else
|
||||
static const length_t components = 3;
|
||||
static const length_t cols = 2;
|
||||
static const length_t rows = 3;
|
||||
static const precision prec = P;
|
||||
# endif
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[3];
|
||||
/// @endcond
|
||||
|
||||
|
||||
public:
|
||||
// Constructors
|
||||
GLM_FUNC_DECL tmat3x2();
|
||||
@ -84,7 +96,7 @@ namespace glm
|
||||
X1 const & x1, Y1 const & y1,
|
||||
X2 const & x2, Y2 const & y2,
|
||||
X3 const & x3, Y3 const & y3);
|
||||
|
||||
|
||||
template <typename V1, typename V2, typename V3>
|
||||
GLM_FUNC_DECL tmat3x2(
|
||||
tvec2<V1, P> const & v1,
|
||||
@ -133,19 +145,19 @@ namespace glm
|
||||
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<T, P> const & m);
|
||||
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator+=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator+=(tmat3x2<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator-=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator-=(tmat3x2<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator*=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
@ -184,10 +196,10 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat2x3<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat4x3<T, P> const & m2);
|
||||
|
||||
|
@ -8,14 +8,14 @@
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -49,6 +49,18 @@ namespace glm
|
||||
typedef tmat3x3<T, P> transpose_type;
|
||||
typedef T value_type;
|
||||
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static GLM_CONSTEXPR length_t components = 3;
|
||||
static GLM_CONSTEXPR length_t cols = 3;
|
||||
static GLM_CONSTEXPR length_t rows = 3;
|
||||
static GLM_CONSTEXPR precision prec = P;
|
||||
# else
|
||||
static const length_t components = 3;
|
||||
static const length_t cols = 3;
|
||||
static const length_t rows = 3;
|
||||
static const precision prec = P;
|
||||
# endif
|
||||
|
||||
template <typename U, precision Q>
|
||||
friend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);
|
||||
template <typename U, precision Q>
|
||||
@ -88,7 +100,7 @@ namespace glm
|
||||
X1 const & x1, Y1 const & y1, Z1 const & z1,
|
||||
X2 const & x2, Y2 const & y2, Z2 const & z2,
|
||||
X3 const & x3, Y3 const & y3, Z3 const & z3);
|
||||
|
||||
|
||||
template <typename V1, typename V2, typename V3>
|
||||
GLM_FUNC_DECL tmat3x3(
|
||||
tvec3<V1, P> const & v1,
|
||||
@ -198,10 +210,10 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat2x3<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat4x3<T, P> const & m2);
|
||||
|
||||
|
@ -8,14 +8,14 @@
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -50,6 +50,18 @@ namespace glm
|
||||
typedef tmat4x3<T, P> transpose_type;
|
||||
typedef T value_type;
|
||||
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static GLM_CONSTEXPR length_t components = 3;
|
||||
static GLM_CONSTEXPR length_t cols = 4;
|
||||
static GLM_CONSTEXPR length_t rows = 3;
|
||||
static GLM_CONSTEXPR precision prec = P;
|
||||
# else
|
||||
static const length_t components = 3;
|
||||
static const length_t cols = 4;
|
||||
static const length_t rows = 3;
|
||||
static const precision prec = P;
|
||||
# endif
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[3];
|
||||
@ -83,7 +95,7 @@ namespace glm
|
||||
X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,
|
||||
X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,
|
||||
X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);
|
||||
|
||||
|
||||
template <typename V1, typename V2, typename V3>
|
||||
GLM_FUNC_DECL tmat3x4(
|
||||
tvec4<V1, P> const & v1,
|
||||
@ -132,19 +144,19 @@ namespace glm
|
||||
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<T, P> const & m);
|
||||
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator+=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator+=(tmat3x4<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator-=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator-=(tmat3x4<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator*=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
@ -178,15 +190,15 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL typename tmat3x4<T, P>::col_type operator*(tmat3x4<T, P> const & m, typename tmat3x4<T, P>::row_type const & v);
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL typename tmat3x4<T, P>::row_type operator*(typename tmat3x4<T, P>::col_type const & v, tmat3x4<T, P> const & m);
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat4x3<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat2x3<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat3x4<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||
|
||||
|
@ -8,14 +8,14 @@
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -50,6 +50,18 @@ namespace glm
|
||||
typedef tmat2x4<T, P> transpose_type;
|
||||
typedef T value_type;
|
||||
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static GLM_CONSTEXPR length_t components = 4;
|
||||
static GLM_CONSTEXPR length_t cols = 2;
|
||||
static GLM_CONSTEXPR length_t rows = 4;
|
||||
static GLM_CONSTEXPR precision prec = P;
|
||||
# else
|
||||
static const length_t components = 4;
|
||||
static const length_t cols = 2;
|
||||
static const length_t rows = 4;
|
||||
static const precision prec = P;
|
||||
# endif
|
||||
|
||||
private:
|
||||
/// @cond DETAIL
|
||||
col_type value[4];
|
||||
@ -70,7 +82,7 @@ namespace glm
|
||||
T const & x2, T const & y2,
|
||||
T const & x3, T const & y3);
|
||||
GLM_FUNC_DECL tmat4x2(
|
||||
col_type const & v0,
|
||||
col_type const & v0,
|
||||
col_type const & v1,
|
||||
col_type const & v2,
|
||||
col_type const & v3);
|
||||
@ -138,19 +150,19 @@ namespace glm
|
||||
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<T, P> const & m);
|
||||
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator+=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator+=(tmat4x2<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator-=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator-=(tmat4x2<U, P> const & m);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator*=(U s);
|
||||
template <typename U>
|
||||
template <typename U>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> & operator/=(U s);
|
||||
|
||||
//////////////////////////////////////
|
||||
@ -189,10 +201,10 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat3x4<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat4x2<T, P> const & m1, tmat4x4<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat2x4<T, P> const & m2);
|
||||
|
||||
|
@ -8,14 +8,14 @@
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -50,8 +50,20 @@ namespace glm
|
||||
typedef tmat3x4<T, P> transpose_type;
|
||||
typedef T value_type;
|
||||
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static GLM_CONSTEXPR length_t components = 4;
|
||||
static GLM_CONSTEXPR length_t cols = 3;
|
||||
static GLM_CONSTEXPR length_t rows = 4;
|
||||
static GLM_CONSTEXPR precision prec = P;
|
||||
# else
|
||||
static const length_t components = 4;
|
||||
static const length_t cols = 3;
|
||||
static const length_t rows = 4;
|
||||
static const precision prec = P;
|
||||
# endif
|
||||
|
||||
private:
|
||||
// Data
|
||||
// Data
|
||||
col_type value[4];
|
||||
|
||||
public:
|
||||
@ -87,7 +99,7 @@ namespace glm
|
||||
X2 const & x2, Y2 const & y2, Z2 const & z2,
|
||||
X3 const & x3, Y3 const & y3, Z3 const & z3,
|
||||
X4 const & x4, Y4 const & y4, Z4 const & z4);
|
||||
|
||||
|
||||
template <typename V1, typename V2, typename V3, typename V4>
|
||||
GLM_FUNC_DECL tmat4x3(
|
||||
tvec3<V1, P> const & v1,
|
||||
@ -191,7 +203,7 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat3x4<T, P> const & m2);
|
||||
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat4x3<T, P> const & m1, tmat4x4<T, P> const & m2);
|
||||
|
||||
|
@ -8,14 +8,14 @@
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -49,6 +49,18 @@ namespace glm
|
||||
typedef tmat4x4<T, P> transpose_type;
|
||||
typedef T value_type;
|
||||
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static GLM_CONSTEXPR length_t components = 4;
|
||||
static GLM_CONSTEXPR length_t cols = 4;
|
||||
static GLM_CONSTEXPR length_t rows = 4;
|
||||
static GLM_CONSTEXPR precision prec = P;
|
||||
# else
|
||||
static const length_t components = 4;
|
||||
static const length_t cols = 4;
|
||||
static const length_t rows = 4;
|
||||
static const precision prec = P;
|
||||
# endif
|
||||
|
||||
template <typename U, precision Q>
|
||||
friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);
|
||||
template <typename U, precision Q>
|
||||
@ -177,13 +189,13 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> operator+(T const & s, tmat4x4<T, P> const & m);
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> operator+(tmat4x4<T, P> const & m1, tmat4x4<T, P> const & m2);
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> operator-(tmat4x4<T, P> const & m, T const & s);
|
||||
|
||||
template <typename T, precision P>
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_DECL tmat4x4<T, P> operator-(T const & s, tmat4x4<T, P> const & m);
|
||||
|
||||
template <typename T, precision P>
|
||||
|
@ -8,14 +8,14 @@
|
||||
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
/// copies of the Software, and to permit persons to whom the Software is
|
||||
/// furnished to do so, subject to the following conditions:
|
||||
///
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
///
|
||||
/// Restrictions:
|
||||
/// By making use of the Software for military purposes, you choose to make
|
||||
/// a Bunny unhappy.
|
||||
///
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
@ -33,9 +33,9 @@
|
||||
///
|
||||
/// @defgroup gtx_simd_mat4 GLM_GTX_simd_mat4
|
||||
/// @ingroup gtx
|
||||
///
|
||||
///
|
||||
/// @brief SIMD implementation of mat4 type.
|
||||
///
|
||||
///
|
||||
/// <glm/gtx/simd_mat4.hpp> need to be included to use these functionalities.
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -71,6 +71,18 @@ namespace detail
|
||||
typedef fmat4x4SIMD type;
|
||||
typedef fmat4x4SIMD transpose_type;
|
||||
|
||||
# if GLM_HAS_CONSTEXPR
|
||||
static GLM_CONSTEXPR length_t components = 4;
|
||||
static GLM_CONSTEXPR length_t cols = 4;
|
||||
static GLM_CONSTEXPR length_t rows = 4;
|
||||
static GLM_CONSTEXPR precision prec = defaultp;
|
||||
# else
|
||||
static const length_t components = 4;
|
||||
static const length_t cols = 4;
|
||||
static const length_t rows = 4;
|
||||
static const precision prec = defaultp;
|
||||
# endif
|
||||
|
||||
GLM_FUNC_DECL length_t length() const;
|
||||
|
||||
fvec4SIMD Data[4];
|
||||
@ -96,7 +108,7 @@ namespace detail
|
||||
__m128 const in[4]);
|
||||
|
||||
// Conversions
|
||||
//template <typename U>
|
||||
//template <typename U>
|
||||
//explicit tmat4x4(tmat4x4<U> const & m);
|
||||
|
||||
//explicit tmat4x4(tmat2x2<T> const & x);
|
||||
|
Loading…
Reference in New Issue
Block a user