Mathter
A configurable 3D math library for game developers.
Public Member Functions | Friends | List of all members
mathter::Matrix< T, Rows, Columns, Order, Layout, Packed > Class Template Reference

#include <Definitions.hpp>

+ Inheritance diagram for mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >:

Public Member Functions

 Matrix ()=default
 
template<class T2 , eMatrixLayout Layout2, bool Packed2>
 Matrix (const Matrix< T2, Rows, Columns, Order, Layout2, Packed2 > &rhs)
 
template<class T2 , eMatrixLayout Layout2, bool Packed2>
 Matrix (const Matrix< T2, Columns, Rows, Order==eMatrixOrder::FOLLOW_VECTOR ? eMatrixOrder::PRECEDE_VECTOR :eMatrixOrder::FOLLOW_VECTOR, Layout2, Packed2 > &rhs)
 
template<class H , class... Args, typename std::enable_if< traits::All< traits::IsScalar, H, Args... >::value, int >::type = 0, typename std::enable_if< 1+sizeof...(Args)==Rows *Columns, int >::type = 0>
 Matrix (H h, Args... args)
 
template<class T2 , bool Packed2, class = typename std::enable_if<VectorAssignable, T2>::type>
 Matrix (const Vector< T2, VecDim, Packed2 > &v)
 
T & operator() (int row, int col)
 
operator() (int row, int col) const
 
template<class Q = T>
std::enable_if<(Columns==1 &&Rows > 1)||(Columns > 1 &&Rows==1), Q >::type & operator() (int idx)
 
template<class Q = T>
std::enable_if<(Columns==1 &&Rows > 1)||(Columns > 1 &&Rows==1), Q >::type operator() (int idx) const
 
template<int Subrows, int Subcolumns>
mathter::SubmatrixHelper< Matrix, Subrows, Subcolumns > Submatrix (int rowIdx, int colIdx)
 
template<int Subrows, int Subcolumns>
mathter::SubmatrixHelper< const Matrix, Subrows, Subcolumns > Submatrix (int rowIdx, int colIdx) const
 
auto Column (int colIdx)
 Return the submatrix corresponding to the specified column. More...
 
auto Row (int rowIdx)
 Return the submatrix corresponding to the specified row. More...
 
auto Column (int colIdx) const
 Return the submatrix corresponding to the specified column. More...
 
auto Row (int rowIdx) const
 Return the submatrix corresponding to the specified row. More...
 
template<class T2 , bool Packed2, class = typename std::enable_if<VectorAssignable, T2>::type>
 operator Vector< T2, VecDim, Packed2 > () const
 
- Public Member Functions inherited from mathter::MatrixData< T, Rows, Columns, Order, Layout, Packed >
constexpr int ColumnCount () const
 Returns the number of columns of the matrix. More...
 
constexpr int RowCount () const
 Returns the number of rows of the matrix. More...
 
constexpr int Width () const
 Returns the number of columns of the matrix. More...
 
constexpr int Height () const
 Returns the number of rows of the matrix. More...
 

Friends

template<class T2 , int Rows2, int Columns2, eMatrixOrder Order2, eMatrixLayout Layout2, bool Packed2>
class Matrix
 

Additional Inherited Members

- Public Attributes inherited from mathter::MatrixData< T, Rows, Columns, Order, Layout, Packed >
std::array< Vector< T, StripeDim, Packed >, StripeCountstripes
 
- Static Public Attributes inherited from mathter::MatrixData< T, Rows, Columns, Order, Layout, Packed >
static constexpr int StripeDim = Layout == eMatrixLayout::ROW_MAJOR ? Columns : Rows
 
static constexpr int StripeCount = Layout == eMatrixLayout::ROW_MAJOR ? Rows : Columns
 

Constructor & Destructor Documentation

◆ Matrix() [1/5]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Matrix ( )
default

◆ Matrix() [2/5]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
template<class T2 , eMatrixLayout Layout2, bool Packed2>
mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Matrix ( const Matrix< T2, Rows, Columns, Order, Layout2, Packed2 > &  rhs)
inline

◆ Matrix() [3/5]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
template<class T2 , eMatrixLayout Layout2, bool Packed2>
mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Matrix ( const Matrix< T2, Columns, Rows, Order==eMatrixOrder::FOLLOW_VECTOR ? eMatrixOrder::PRECEDE_VECTOR :eMatrixOrder::FOLLOW_VECTOR, Layout2, Packed2 > &  rhs)
inline

◆ Matrix() [4/5]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
template<class H , class... Args, typename std::enable_if< traits::All< traits::IsScalar, H, Args... >::value, int >::type = 0, typename std::enable_if< 1+sizeof...(Args)==Rows *Columns, int >::type = 0>
mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Matrix ( h,
Args...  args 
)
inline

◆ Matrix() [5/5]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
template<class T2 , bool Packed2, class = typename std::enable_if<VectorAssignable, T2>::type>
mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Matrix ( const Vector< T2, VecDim, Packed2 > &  v)
inline

Member Function Documentation

◆ Column() [1/2]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
auto mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Column ( int  colIdx)
inline

Return the submatrix corresponding to the specified column.

◆ Column() [2/2]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
auto mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Column ( int  colIdx) const
inline

Return the submatrix corresponding to the specified column.

◆ operator Vector< T2, VecDim, Packed2 >()

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
template<class T2 , bool Packed2, class = typename std::enable_if<VectorAssignable, T2>::type>
mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::operator Vector< T2, VecDim, Packed2 > ( ) const
inline

◆ operator()() [1/4]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
T& mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::operator() ( int  row,
int  col 
)
inline

◆ operator()() [2/4]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
T mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::operator() ( int  row,
int  col 
) const
inline

◆ operator()() [3/4]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
template<class Q = T>
std::enable_if<(Columns == 1 && Rows > 1) || (Columns > 1 && Rows == 1), Q>::type& mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::operator() ( int  idx)
inline

◆ operator()() [4/4]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
template<class Q = T>
std::enable_if<(Columns == 1 && Rows > 1) || (Columns > 1 && Rows == 1), Q>::type mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::operator() ( int  idx) const
inline

◆ Row() [1/2]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
auto mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Row ( int  rowIdx)
inline

Return the submatrix corresponding to the specified row.

◆ Row() [2/2]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
auto mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Row ( int  rowIdx) const
inline

Return the submatrix corresponding to the specified row.

◆ Submatrix() [1/2]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
template<int Subrows, int Subcolumns>
mathter::SubmatrixHelper<Matrix, Subrows, Subcolumns> mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Submatrix ( int  rowIdx,
int  colIdx 
)
inline

◆ Submatrix() [2/2]

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
template<int Subrows, int Subcolumns>
mathter::SubmatrixHelper<const Matrix, Subrows, Subcolumns> mathter::Matrix< T, Rows, Columns, Order, Layout, Packed >::Submatrix ( int  rowIdx,
int  colIdx 
) const
inline

Friends And Related Function Documentation

◆ Matrix

template<class T, int Rows, int Columns, eMatrixOrder Order = eMatrixOrder::FOLLOW_VECTOR, eMatrixLayout Layout = eMatrixLayout::ROW_MAJOR, bool Packed = false>
template<class T2 , int Rows2, int Columns2, eMatrixOrder Order2, eMatrixLayout Layout2, bool Packed2>
friend class Matrix
friend

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