3x3 matrix. More...

#include <math.h>

Public Types

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

Public Member Functions

LM_INLINE TMat3 (const MatT &m)
 
LM_INLINE TMat3 (const TMat4< T, Opt > &m)
 
LM_INLINE TMat3 (const VecT &v0, const VecT &v1, const VecT &v2)
 
LM_INLINE TMat3 (const T &s)
 
LM_INLINE TMat3 (ParamT v00, ParamT v10, ParamT v20, ParamT v01, ParamT v11, ParamT v21, ParamT v02, ParamT v12, ParamT v22)
 
LM_INLINE TMat3 (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 = 3
 

Detailed Description

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

3x3 matrix.

Generic column major 3x3 matrix. A matrix v00 v01 v02 v10 v11 v12 v20 v21 v22 is stored sequentially as v00, v10, ..., v22.

Template Parameters
TInternal value type.
OptOptimizatoin flag.