Rasterfarm-SDK
Loading...
Searching...
No Matches
matrix.h File Reference
#include "utils.h"
#include "error.h"
#include "vector.h"
#include "quaternion.h"

Classes

class  Matrix< T, ROWS, COLS >
 

Typedefs

using Matrix2d = Matrix< double, 2, 2 >
 
using Matrix3d = Matrix< double, 3, 3 >
 
using Matrix4d = Matrix< double, 4, 4 >
 
using Matrix2f = Matrix< float, 2, 2 >
 
using Matrix3f = Matrix< float, 3, 3 >
 
using Matrix4f = Matrix< float, 4, 4 >
 
using Matrix2s = Matrix< short, 2, 2 >
 
using Matrix3s = Matrix< short, 3, 3 >
 
using Matrix4s = Matrix< short, 4, 4 >
 
using Matrix2i = Matrix< int, 2, 2 >
 
using Matrix3i = Matrix< int, 3, 3 >
 
using Matrix4i = Matrix< int, 4, 4 >
 

Functions

template<typename T , uint ROWS, uint COLS>
bool compare (const Matrix< T, ROWS, COLS > &a, const Matrix< T, ROWS, COLS > &b, T precision)
 
template<typename T , uint ROWS, uint COLS>
const Matrix< T, ROWS, COLS > operator+ (const Matrix< T, ROWS, COLS > &srcA, const Matrix< T, ROWS, COLS > &srcB)
 
template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > operator- (const Matrix< T, ROWS, COLS > &srcA, const Matrix< T, ROWS, COLS > &srcB)
 
template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > operator* (const Matrix< T, ROWS, COLS > &srcA, const Matrix< T, ROWS, COLS > &srcB)
 
template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > operator* (const Matrix< T, ROWS - 1, COLS - 1 > &srcA, const Matrix< T, ROWS, COLS > &srcB)
 
template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > operator* (const Matrix< T, ROWS, COLS > &srcA, const Matrix< T, ROWS - 1, COLS - 1 > &srcB)
 
template<typename T , uint LENGTH>
Matrix< T, 1, LENGTH > operator* (const Matrix< T, LENGTH - 1, LENGTH - 1 > &srcA, const Matrix< T, 1, LENGTH > &srcB)
 
template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > transposition (const Matrix< T, ROWS, COLS > &in)
 
template<typename T >
Matrix< T, 3, 3 > inversion (const Matrix< T, 3, 3 > &in)
 
template<typename T >
Matrix< T, 4, 4 > inversion (const Matrix< T, 4, 4 > &in)
 
template<typename T , uint LENGTH>
Vector< T, LENGTH > operator* (const Matrix< T, LENGTH, LENGTH > &srcA, const Vector< T, LENGTH > &srcB)
 
template<typename T , uint LENGTH>
Vector< T, LENGTH - 1 > operator* (const Matrix< T, LENGTH, LENGTH > &srcA, const Vector< T, LENGTH - 1 > &srcB)
 
template<typename T , uint LENGTH>
Vector< T, LENGTH+1 > operator* (const Matrix< T, LENGTH, LENGTH > &srcA, const Vector< T, LENGTH+1 > &srcB)
 
template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > operator* (const T &srcA, const Matrix< T, ROWS, COLS > &mat)
 
template<typename T , uint LENGTH>
const HeapArray< Vector< T, LENGTH > > operator* (const Matrix< T, LENGTH, LENGTH > &src, const HeapArray< Vector< T, LENGTH > > &array)
 
template<typename T , uint LENGTH>
HeapArray< Vector< T, LENGTH - 1 > > operator* (const Matrix< T, LENGTH, LENGTH > &src, const HeapArray< Vector< T, LENGTH - 1 > > &array)
 
template<typename T , uint LENGTH>
HeapArray< Vector< T, LENGTH+1 > > operator* (const Matrix< T, LENGTH, LENGTH > &src, const HeapArray< Vector< T, LENGTH+1 > > &array)
 
template<typename T >
Matrix< T, 3, 3 > diagonalFromSymetric (const Matrix< T, 3, 3 > &in, Quaternion< T > &result)
 
template<typename T >
Matrix< T, 3, 3 > diagonalFromSymetric (const Matrix< T, 3, 3 > &in)
 
template<typename T >
T determinant (const Matrix< T, 3, 3 > &m)
 
template<typename T >
void setPosition (const Vector< T, 3 > &vec, Matrix< T, 4, 4 > &m)
 
template<typename T >
void setPosition (const Vector< T, 3 > &vec, Matrix< T, 4, 4 > *pM)
 
template<typename T >
const Vector< T, 3 > getPosition (const Matrix< T, 4, 4 > &m)
 
template<typename T >
Vector< T, 3 > getPosition (const Matrix< T, 4, 4 > *pM)
 

Typedef Documentation

◆ Matrix2d

using Matrix2d = Matrix< double, 2, 2 >

◆ Matrix2f

using Matrix2f = Matrix< float, 2, 2 >

◆ Matrix2i

using Matrix2i = Matrix< int, 2, 2 >

◆ Matrix2s

using Matrix2s = Matrix< short, 2, 2 >

◆ Matrix3d

using Matrix3d = Matrix< double, 3, 3 >

◆ Matrix3f

using Matrix3f = Matrix< float, 3, 3 >

◆ Matrix3i

using Matrix3i = Matrix< int, 3, 3 >

◆ Matrix3s

using Matrix3s = Matrix< short, 3, 3 >

◆ Matrix4d

using Matrix4d = Matrix< double, 4, 4 >

◆ Matrix4f

using Matrix4f = Matrix< float, 4, 4 >

◆ Matrix4i

using Matrix4i = Matrix< int, 4, 4 >

◆ Matrix4s

using Matrix4s = Matrix< short, 4, 4 >

Function Documentation

◆ compare()

template<typename T , uint ROWS, uint COLS>
bool compare ( const Matrix< T, ROWS, COLS > & a,
const Matrix< T, ROWS, COLS > & b,
T precision )

◆ determinant()

template<typename T >
T determinant ( const Matrix< T, 3, 3 > & m)

◆ diagonalFromSymetric() [1/2]

template<typename T >
Matrix< T, 3, 3 > diagonalFromSymetric ( const Matrix< T, 3, 3 > & in)

◆ diagonalFromSymetric() [2/2]

template<typename T >
Matrix< T, 3, 3 > diagonalFromSymetric ( const Matrix< T, 3, 3 > & in,
Quaternion< T > & result )

◆ getPosition() [1/2]

template<typename T >
const Vector< T, 3 > getPosition ( const Matrix< T, 4, 4 > & m)

◆ getPosition() [2/2]

template<typename T >
Vector< T, 3 > getPosition ( const Matrix< T, 4, 4 > * pM)
inline

◆ inversion() [1/2]

template<typename T >
Matrix< T, 3, 3 > inversion ( const Matrix< T, 3, 3 > & in)

◆ inversion() [2/2]

template<typename T >
Matrix< T, 4, 4 > inversion ( const Matrix< T, 4, 4 > & in)

◆ operator*() [1/11]

template<typename T , uint LENGTH>
Matrix< T, 1, LENGTH > operator* ( const Matrix< T, LENGTH - 1, LENGTH - 1 > & srcA,
const Matrix< T, 1, LENGTH > & srcB )

◆ operator*() [2/11]

template<typename T , uint LENGTH>
HeapArray< Vector< T, LENGTH - 1 > > operator* ( const Matrix< T, LENGTH, LENGTH > & src,
const HeapArray< Vector< T, LENGTH - 1 > > & array )

◆ operator*() [3/11]

template<typename T , uint LENGTH>
const HeapArray< Vector< T, LENGTH > > operator* ( const Matrix< T, LENGTH, LENGTH > & src,
const HeapArray< Vector< T, LENGTH > > & array )

◆ operator*() [4/11]

template<typename T , uint LENGTH>
HeapArray< Vector< T, LENGTH+1 > > operator* ( const Matrix< T, LENGTH, LENGTH > & src,
const HeapArray< Vector< T, LENGTH+1 > > & array )

◆ operator*() [5/11]

template<typename T , uint LENGTH>
Vector< T, LENGTH - 1 > operator* ( const Matrix< T, LENGTH, LENGTH > & srcA,
const Vector< T, LENGTH - 1 > & srcB )

◆ operator*() [6/11]

template<typename T , uint LENGTH>
Vector< T, LENGTH > operator* ( const Matrix< T, LENGTH, LENGTH > & srcA,
const Vector< T, LENGTH > & srcB )

◆ operator*() [7/11]

template<typename T , uint LENGTH>
Vector< T, LENGTH+1 > operator* ( const Matrix< T, LENGTH, LENGTH > & srcA,
const Vector< T, LENGTH+1 > & srcB )

◆ operator*() [8/11]

template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > operator* ( const Matrix< T, ROWS - 1, COLS - 1 > & srcA,
const Matrix< T, ROWS, COLS > & srcB )

◆ operator*() [9/11]

template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > operator* ( const Matrix< T, ROWS, COLS > & srcA,
const Matrix< T, ROWS - 1, COLS - 1 > & srcB )

◆ operator*() [10/11]

template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > operator* ( const Matrix< T, ROWS, COLS > & srcA,
const Matrix< T, ROWS, COLS > & srcB )

◆ operator*() [11/11]

template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > operator* ( const T & srcA,
const Matrix< T, ROWS, COLS > & mat )

◆ operator+()

template<typename T , uint ROWS, uint COLS>
const Matrix< T, ROWS, COLS > operator+ ( const Matrix< T, ROWS, COLS > & srcA,
const Matrix< T, ROWS, COLS > & srcB )

◆ operator-()

template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > operator- ( const Matrix< T, ROWS, COLS > & srcA,
const Matrix< T, ROWS, COLS > & srcB )

◆ setPosition() [1/2]

template<typename T >
void setPosition ( const Vector< T, 3 > & vec,
Matrix< T, 4, 4 > & m )
inline

◆ setPosition() [2/2]

template<typename T >
void setPosition ( const Vector< T, 3 > & vec,
Matrix< T, 4, 4 > * pM )
inline

◆ transposition()

template<typename T , uint ROWS, uint COLS>
Matrix< T, ROWS, COLS > transposition ( const Matrix< T, ROWS, COLS > & in)