Otclient  14/8/2020
Matrix< N, M, T > Class Template Reference

#include <matrix.h>

Public Member Functions

 Matrix ()
 
 Matrix (int)
 
 Matrix (const Matrix< N, M, T > &other)=default
 
template<typename U >
 Matrix (const std::initializer_list< U > &values)
 
template<typename U >
 Matrix (const U *values)
 
void setIdentity ()
 
bool isIdentity () const
 
void fill (T value)
 
Matrix< M, N, T > transposed () const
 
std::enable_if< N==M >::type transpose ()
 
T * data ()
 
const T * data () const
 
T & operator() (int row, int column)
 
operator() (int row, int column) const
 
Matrix< N, M, T > & operator= (const Matrix< N, M, T > &other)=default
 
template<typename U >
Matrix< N, M, T > & operator= (const std::initializer_list< U > &values)
 
template<typename U >
Matrix< N, M, T > & operator= (const U *values)
 
Matrix< N, M, T > & operator+= (const Matrix< N, M, T > &other)
 
Matrix< N, M, T > & operator-= (const Matrix< N, M, T > &other)
 
Matrix< N, M, T > & operator*= (T factor)
 
Matrix< N, M, T > & operator/= (T divisor)
 
bool operator== (const Matrix< N, M, T > &other) const
 
bool operator!= (const Matrix< N, M, T > &other) const
 
bool operator== (const Matrix< 3, 3, float > &other) const
 

Detailed Description

template<int N, int M, typename T = float>
class Matrix< N, M, T >

Definition at line 32 of file matrix.h.

Constructor & Destructor Documentation

◆ Matrix() [1/5]

template<int N, int M, typename T = float>
Matrix< N, M, T >::Matrix ( )
inline

Definition at line 35 of file matrix.h.

Here is the call graph for this function:

◆ Matrix() [2/5]

template<int N, int M, typename T = float>
Matrix< N, M, T >::Matrix ( int  )
inline

Definition at line 36 of file matrix.h.

◆ Matrix() [3/5]

template<int N, int M, typename T = float>
Matrix< N, M, T >::Matrix ( const Matrix< N, M, T > &  other)
default

◆ Matrix() [4/5]

template<int N, int M, typename T = float>
template<typename U >
Matrix< N, M, T >::Matrix ( const std::initializer_list< U > &  values)
inline

Definition at line 39 of file matrix.h.

◆ Matrix() [5/5]

template<int N, int M, typename T = float>
template<typename U >
Matrix< N, M, T >::Matrix ( const U *  values)
inline

Definition at line 41 of file matrix.h.

Member Function Documentation

◆ data() [1/2]

template<int N, int M, typename T = float>
T* Matrix< N, M, T >::data ( )
inline

Definition at line 50 of file matrix.h.

Here is the caller graph for this function:

◆ data() [2/2]

template<int N, int M, typename T = float>
const T* Matrix< N, M, T >::data ( ) const
inline

Definition at line 51 of file matrix.h.

◆ fill()

template<int N, int M, typename T >
void Matrix< N, M, T >::fill ( value)

Definition at line 94 of file matrix.h.

◆ isIdentity()

template<int N, int M, typename T >
bool Matrix< N, M, T >::isIdentity

Definition at line 85 of file matrix.h.

◆ operator!=()

template<int N, int M, typename T >
bool Matrix< N, M, T >::operator!= ( const Matrix< N, M, T > &  other) const

Definition at line 171 of file matrix.h.

◆ operator()() [1/2]

template<int N, int M, typename T = float>
T& Matrix< N, M, T >::operator() ( int  row,
int  column 
)
inline

Definition at line 53 of file matrix.h.

◆ operator()() [2/2]

template<int N, int M, typename T = float>
T Matrix< N, M, T >::operator() ( int  row,
int  column 
) const
inline

Definition at line 54 of file matrix.h.

◆ operator*=()

template<int N, int M, typename T >
Matrix< N, M, T > & Matrix< N, M, T >::operator*= ( factor)

Definition at line 145 of file matrix.h.

◆ operator+=()

template<int N, int M, typename T >
Matrix< N, M, T > & Matrix< N, M, T >::operator+= ( const Matrix< N, M, T > &  other)

Definition at line 129 of file matrix.h.

◆ operator-=()

template<int N, int M, typename T >
Matrix< N, M, T > & Matrix< N, M, T >::operator-= ( const Matrix< N, M, T > &  other)

Definition at line 137 of file matrix.h.

◆ operator/=()

template<int N, int M, typename T >
Matrix< N, M, T > & Matrix< N, M, T >::operator/= ( divisor)

Definition at line 153 of file matrix.h.

◆ operator=() [1/3]

template<int N, int M, typename T = float>
Matrix<N,M,T>& Matrix< N, M, T >::operator= ( const Matrix< N, M, T > &  other)
default

◆ operator=() [2/3]

template<int N, int M, typename T >
template<typename U >
Matrix< N, M, T > & Matrix< N, M, T >::operator= ( const std::initializer_list< U > &  values)

Definition at line 111 of file matrix.h.

◆ operator=() [3/3]

template<int N, int M, typename T >
template<typename U >
Matrix< N, M, T > & Matrix< N, M, T >::operator= ( const U *  values)

Definition at line 121 of file matrix.h.

◆ operator==() [1/2]

bool Matrix< 3, 3, float >::operator== ( const Matrix< 3, 3, float > &  other) const
inline

Definition at line 201 of file matrix.h.

◆ operator==() [2/2]

template<int N, int M, typename T >
bool Matrix< N, M, T >::operator== ( const Matrix< N, M, T > &  other) const

Definition at line 161 of file matrix.h.

◆ setIdentity()

template<int N, int M, typename T >
void Matrix< N, M, T >::setIdentity

Definition at line 73 of file matrix.h.

Here is the caller graph for this function:

◆ transpose()

template<int N, int M, typename T = float>
std::enable_if<N==M>::type Matrix< N, M, T >::transpose ( )
inline

Definition at line 48 of file matrix.h.

Here is the call graph for this function:

◆ transposed()

template<int N, int M, typename T >
Matrix< M, N, T > Matrix< N, M, T >::transposed

Definition at line 101 of file matrix.h.

Here is the caller graph for this function:

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