4x4 matrix. More...

#include <math.h>

Public Types

using VT = T
 
using MatT = TMat4< T, Opt >
 
template<typename T_ , SIMD Opt_>
using TVec = TVec4< T_, Opt_ >
 
using VecT = TVec4< T, Opt >
 
using ParamT = std::conditional_t< std::is_fundamental< T >::value, T, const T & >
 
using RetT = ParamT
 

Public Member Functions

LM_INLINE TMat4 (const MatT &m)
 
LM_INLINE TMat4 (const VecT &v0, const VecT &v1, const VecT &v2, const VecT &v3)
 
LM_INLINE TMat4 (const T &s)
 
LM_INLINE TMat4 (ParamT v00, ParamT v10, ParamT v20, ParamT v30, ParamT v01, ParamT v11, ParamT v21, ParamT v31, ParamT v02, ParamT v12, ParamT v22, ParamT v32, ParamT v03, ParamT v13, ParamT v23, ParamT v33)
 
LM_INLINE TMat4 (std::initializer_list< VT > l)
 
LM_INLINE auto operator[] (int i) -> VecT &
 
LM_INLINE auto operator[] (int i) const -> const VecT &
 
LM_INLINE auto operator*= (const MatT &m) -> MatT &
 

Static Public Member Functions

static auto Identity () -> MatT
 

Public Attributes

VecT v_ [NC]
 

Static Public Attributes

static constexpr MathObjectType ObjT = MathObjectType::Mat
 
static constexpr int NC = 4
 

Detailed Description

template<typename T, SIMD Opt = SIMD::None>
struct TMat4< T, Opt >

4x4 matrix.

Generic column major 4x4 matrix. A matrix v00 v01 v02 v03 v10 v11 v12 v13 v20 v21 v22 v23 v30 v31 v32 v33 is stored sequentially as v00, v10, ..., v33

Template Parameters
TInternal value type.
OptOptimizatoin flag.