Add static rows, cols, prec, and components fields to all matrix types

master
Jesse Talavera-Greenberg ago%!(EXTRA string=10 years)
parent 5d05c8c1f7
commit 38f63d3943
  1. 12
      glm/detail/type_mat2x2.hpp
  2. 12
      glm/detail/type_mat2x3.hpp
  3. 12
      glm/detail/type_mat2x4.hpp
  4. 12
      glm/detail/type_mat3x2.hpp
  5. 12
      glm/detail/type_mat3x3.hpp
  6. 12
      glm/detail/type_mat3x4.hpp
  7. 12
      glm/detail/type_mat4x2.hpp
  8. 12
      glm/detail/type_mat4x3.hpp
  9. 12
      glm/detail/type_mat4x4.hpp
  10. 12
      glm/gtx/simd_mat4.hpp

@ -54,6 +54,18 @@ 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];

@ -50,6 +50,18 @@ 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
col_type value[2];

@ -50,6 +50,18 @@ 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];

@ -50,6 +50,18 @@ 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];

@ -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>

@ -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];

@ -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];

@ -50,6 +50,18 @@ 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
col_type value[4];

@ -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>

@ -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];

Loading…
Cancel
Save