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>
|
template <typename U, precision Q>
|
||||||
friend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);
|
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:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
col_type value[2];
|
col_type value[2];
|
||||||
|
@ -50,6 +50,18 @@ namespace glm
|
|||||||
typedef tmat3x2<T, P> transpose_type;
|
typedef tmat3x2<T, P> transpose_type;
|
||||||
typedef T value_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:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
col_type value[2];
|
col_type value[2];
|
||||||
|
@ -50,6 +50,18 @@ namespace glm
|
|||||||
typedef tmat4x2<T, P> transpose_type;
|
typedef tmat4x2<T, P> transpose_type;
|
||||||
typedef T value_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:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
col_type value[2];
|
col_type value[2];
|
||||||
|
@ -50,6 +50,18 @@ namespace glm
|
|||||||
typedef tmat2x3<T, P> transpose_type;
|
typedef tmat2x3<T, P> transpose_type;
|
||||||
typedef T value_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:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
col_type value[3];
|
col_type value[3];
|
||||||
|
@ -49,6 +49,18 @@ namespace glm
|
|||||||
typedef tmat3x3<T, P> transpose_type;
|
typedef tmat3x3<T, P> transpose_type;
|
||||||
typedef T value_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>
|
template <typename U, precision Q>
|
||||||
friend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);
|
friend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);
|
||||||
template <typename U, precision Q>
|
template <typename U, precision Q>
|
||||||
|
@ -50,6 +50,18 @@ namespace glm
|
|||||||
typedef tmat4x3<T, P> transpose_type;
|
typedef tmat4x3<T, P> transpose_type;
|
||||||
typedef T value_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:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
col_type value[3];
|
col_type value[3];
|
||||||
|
@ -50,6 +50,18 @@ namespace glm
|
|||||||
typedef tmat2x4<T, P> transpose_type;
|
typedef tmat2x4<T, P> transpose_type;
|
||||||
typedef T value_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:
|
private:
|
||||||
/// @cond DETAIL
|
/// @cond DETAIL
|
||||||
col_type value[4];
|
col_type value[4];
|
||||||
|
@ -50,6 +50,18 @@ namespace glm
|
|||||||
typedef tmat3x4<T, P> transpose_type;
|
typedef tmat3x4<T, P> transpose_type;
|
||||||
typedef T value_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:
|
private:
|
||||||
// Data
|
// Data
|
||||||
col_type value[4];
|
col_type value[4];
|
||||||
|
@ -49,6 +49,18 @@ namespace glm
|
|||||||
typedef tmat4x4<T, P> transpose_type;
|
typedef tmat4x4<T, P> transpose_type;
|
||||||
typedef T value_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>
|
template <typename U, precision Q>
|
||||||
friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);
|
friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);
|
||||||
template <typename U, precision Q>
|
template <typename U, precision Q>
|
||||||
|
@ -71,6 +71,18 @@ namespace detail
|
|||||||
typedef fmat4x4SIMD type;
|
typedef fmat4x4SIMD type;
|
||||||
typedef fmat4x4SIMD transpose_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;
|
GLM_FUNC_DECL length_t length() const;
|
||||||
|
|
||||||
fvec4SIMD Data[4];
|
fvec4SIMD Data[4];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user