mirror of
https://github.com/g-truc/glm.git
synced 2024-11-12 21: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
@ -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…
Reference in New Issue
Block a user