Berserk
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
TMatMxN< T, M, N > Class Template Reference

Generic matrix of M x N size for space of type T. More...

#include <TMatMxN.hpp>

Public Member Functions

 TMatMxN () noexcept
 
 TMatMxN (const std::array< TVecN< T, N >, M > &rows) noexcept
 
 TMatMxN (const T *vs, size_t count)
 
 TMatMxN (T m_00, T m_01, T m_10, T m_11) noexcept
 
 TMatMxN (T m_00, T m_01, T m_02, T m_10, T m_11, T m_12, T m_20, T m_21, T m_22) noexcept
 
 TMatMxN (T m_00, T m_01, T m_02, T m_03, T m_10, T m_11, T m_12, T m_13, T m_20, T m_21, T m_22, T m_23, T m_30, T m_31, T m_32, T m_33) noexcept
 
 TMatMxN (const TMatMxN &other) noexcept
 
 TMatMxN (TMatMxN &&other) noexcept
 
template<uint32 M1, uint32 N1>
 TMatMxN (const TMatMxN< T, M1, N1 > &other)
 
TMatMxN & operator+= (const TMatMxN &other)
 
TMatMxN & operator-= (const TMatMxN &other)
 
TMatMxN operator+ (const TMatMxN &other) const
 
TMatMxN operator- (const TMatMxN &other) const
 
template<uint32 K>
TMatMxN< T, M, K > operator* (const TMatMxN< T, N, K > &other) const
 
TMatMxN & operator*= (T other)
 
TMatMxN & operator/= (T other)
 
TMatMxN & operator+= (T other)
 
TMatMxN & operator-= (T other)
 
TMatMxN operator* (T value) const
 
TMatMxN operator/ (T value) const
 
TMatMxN operator+ (T value) const
 
TMatMxN operator- (T value) const
 
TMatMxN & operator= (const TMatMxN &other)
 
template<uint32 M1, uint32 N1>
TMatMxN< T, M1, N1 > SubMatrix (uint32 i, uint32 j) const
 
template<uint32 M1, uint32 N1>
void SubMatrix (TMatMxN< T, M1, N1 > &result, uint32 i, uint32 j) const
 
TMatMxN< T, M, N - 1 > ExcludeColumn (uint32 columnIndex) const
 
TMatMxN< T, N, M > Transpose () const
 
TVecN< T, M > GetColumn (uint32 index) const
 
TVecN< T, N > GetRow (uint32 index) const
 
TVecN< T, M > operator* (const TVecN< T, N > &v) const
 
void Zero ()
 
T * operator[] (uint32 i)
 
const T * operator[] (uint32 i) const
 
T * GetData ()
 
const T * GetData () const
 

Static Public Member Functions

constexpr static uint32 GetStride ()
 
constexpr static uint32 GetSize ()
 
constexpr static uint32 GetDimM ()
 
constexpr static uint32 GetDimN ()
 

Public Attributes

T values [M *N]
 

Detailed Description

template<typename T, uint32 M, uint32 N>
class TMatMxN< T, M, N >

Generic matrix of M x N size for space of type T.

Note
Matrix data stored in row-major order
Template Parameters
TType of scalar matrix elements
MNumber of matrix rows
NNumber of matrix columns

Constructor & Destructor Documentation

◆ TMatMxN() [1/9]

template<typename T , uint32 M, uint32 N>
TMatMxN< T, M, N >::TMatMxN ( )
inlinenoexcept

◆ TMatMxN() [2/9]

template<typename T , uint32 M, uint32 N>
TMatMxN< T, M, N >::TMatMxN ( const std::array< TVecN< T, N >, M > &  rows)
inlineexplicitnoexcept

◆ TMatMxN() [3/9]

template<typename T , uint32 M, uint32 N>
TMatMxN< T, M, N >::TMatMxN ( const T *  vs,
size_t  count 
)
inline

◆ TMatMxN() [4/9]

template<typename T , uint32 M, uint32 N>
TMatMxN< T, M, N >::TMatMxN ( T  m_00,
T  m_01,
T  m_10,
T  m_11 
)
inlinenoexcept

◆ TMatMxN() [5/9]

template<typename T , uint32 M, uint32 N>
TMatMxN< T, M, N >::TMatMxN ( T  m_00,
T  m_01,
T  m_02,
T  m_10,
T  m_11,
T  m_12,
T  m_20,
T  m_21,
T  m_22 
)
inlinenoexcept

◆ TMatMxN() [6/9]

template<typename T , uint32 M, uint32 N>
TMatMxN< T, M, N >::TMatMxN ( T  m_00,
T  m_01,
T  m_02,
T  m_03,
T  m_10,
T  m_11,
T  m_12,
T  m_13,
T  m_20,
T  m_21,
T  m_22,
T  m_23,
T  m_30,
T  m_31,
T  m_32,
T  m_33 
)
inlinenoexcept

◆ TMatMxN() [7/9]

template<typename T , uint32 M, uint32 N>
TMatMxN< T, M, N >::TMatMxN ( const TMatMxN< T, M, N > &  other)
inlinenoexcept

◆ TMatMxN() [8/9]

template<typename T , uint32 M, uint32 N>
TMatMxN< T, M, N >::TMatMxN ( TMatMxN< T, M, N > &&  other)
inlinenoexcept

◆ TMatMxN() [9/9]

template<typename T , uint32 M, uint32 N>
template<uint32 M1, uint32 N1>
TMatMxN< T, M, N >::TMatMxN ( const TMatMxN< T, M1, N1 > &  other)
inline

Member Function Documentation

◆ ExcludeColumn()

template<typename T , uint32 M, uint32 N>
TMatMxN<T, M, N - 1> TMatMxN< T, M, N >::ExcludeColumn ( uint32  columnIndex) const
inline

◆ GetColumn()

template<typename T , uint32 M, uint32 N>
TVecN<T, M> TMatMxN< T, M, N >::GetColumn ( uint32  index) const
inline

◆ GetData() [1/2]

template<typename T , uint32 M, uint32 N>
T* TMatMxN< T, M, N >::GetData ( )
inline

◆ GetData() [2/2]

template<typename T , uint32 M, uint32 N>
const T* TMatMxN< T, M, N >::GetData ( ) const
inline

◆ GetDimM()

template<typename T , uint32 M, uint32 N>
constexpr static uint32 TMatMxN< T, M, N >::GetDimM ( )
inlinestaticconstexpr

◆ GetDimN()

template<typename T , uint32 M, uint32 N>
constexpr static uint32 TMatMxN< T, M, N >::GetDimN ( )
inlinestaticconstexpr

◆ GetRow()

template<typename T , uint32 M, uint32 N>
TVecN<T, N> TMatMxN< T, M, N >::GetRow ( uint32  index) const
inline

◆ GetSize()

template<typename T , uint32 M, uint32 N>
constexpr static uint32 TMatMxN< T, M, N >::GetSize ( )
inlinestaticconstexpr

◆ GetStride()

template<typename T , uint32 M, uint32 N>
constexpr static uint32 TMatMxN< T, M, N >::GetStride ( )
inlinestaticconstexpr

◆ operator*() [1/3]

template<typename T , uint32 M, uint32 N>
template<uint32 K>
TMatMxN<T, M, K> TMatMxN< T, M, N >::operator* ( const TMatMxN< T, N, K > &  other) const
inline

◆ operator*() [2/3]

template<typename T , uint32 M, uint32 N>
TVecN<T, M> TMatMxN< T, M, N >::operator* ( const TVecN< T, N > &  v) const
inline

◆ operator*() [3/3]

template<typename T , uint32 M, uint32 N>
TMatMxN TMatMxN< T, M, N >::operator* ( T  value) const
inline

◆ operator*=()

template<typename T , uint32 M, uint32 N>
TMatMxN& TMatMxN< T, M, N >::operator*= ( T  other)
inline

◆ operator+() [1/2]

template<typename T , uint32 M, uint32 N>
TMatMxN TMatMxN< T, M, N >::operator+ ( const TMatMxN< T, M, N > &  other) const
inline

◆ operator+() [2/2]

template<typename T , uint32 M, uint32 N>
TMatMxN TMatMxN< T, M, N >::operator+ ( T  value) const
inline

◆ operator+=() [1/2]

template<typename T , uint32 M, uint32 N>
TMatMxN& TMatMxN< T, M, N >::operator+= ( const TMatMxN< T, M, N > &  other)
inline

◆ operator+=() [2/2]

template<typename T , uint32 M, uint32 N>
TMatMxN& TMatMxN< T, M, N >::operator+= ( T  other)
inline

◆ operator-() [1/2]

template<typename T , uint32 M, uint32 N>
TMatMxN TMatMxN< T, M, N >::operator- ( const TMatMxN< T, M, N > &  other) const
inline

◆ operator-() [2/2]

template<typename T , uint32 M, uint32 N>
TMatMxN TMatMxN< T, M, N >::operator- ( T  value) const
inline

◆ operator-=() [1/2]

template<typename T , uint32 M, uint32 N>
TMatMxN& TMatMxN< T, M, N >::operator-= ( const TMatMxN< T, M, N > &  other)
inline

◆ operator-=() [2/2]

template<typename T , uint32 M, uint32 N>
TMatMxN& TMatMxN< T, M, N >::operator-= ( T  other)
inline

◆ operator/()

template<typename T , uint32 M, uint32 N>
TMatMxN TMatMxN< T, M, N >::operator/ ( T  value) const
inline

◆ operator/=()

template<typename T , uint32 M, uint32 N>
TMatMxN& TMatMxN< T, M, N >::operator/= ( T  other)
inline

◆ operator=()

template<typename T , uint32 M, uint32 N>
TMatMxN& TMatMxN< T, M, N >::operator= ( const TMatMxN< T, M, N > &  other)
inline

◆ operator[]() [1/2]

template<typename T , uint32 M, uint32 N>
T* TMatMxN< T, M, N >::operator[] ( uint32  i)
inline

◆ operator[]() [2/2]

template<typename T , uint32 M, uint32 N>
const T* TMatMxN< T, M, N >::operator[] ( uint32  i) const
inline

◆ SubMatrix() [1/2]

template<typename T , uint32 M, uint32 N>
template<uint32 M1, uint32 N1>
void TMatMxN< T, M, N >::SubMatrix ( TMatMxN< T, M1, N1 > &  result,
uint32  i,
uint32  j 
) const
inline

◆ SubMatrix() [2/2]

template<typename T , uint32 M, uint32 N>
template<uint32 M1, uint32 N1>
TMatMxN<T, M1, N1> TMatMxN< T, M, N >::SubMatrix ( uint32  i,
uint32  j 
) const
inline

◆ Transpose()

template<typename T , uint32 M, uint32 N>
TMatMxN<T, N, M> TMatMxN< T, M, N >::Transpose ( ) const
inline

◆ Zero()

template<typename T , uint32 M, uint32 N>
void TMatMxN< T, M, N >::Zero ( )
inline

Member Data Documentation

◆ values

template<typename T , uint32 M, uint32 N>
T TMatMxN< T, M, N >::values[M *N]

The documentation for this class was generated from the following file: