jrlMathTools::Matrix4x4< T > Struct Template Reference

Generic 4x4 matrix. More...

#include <jrl/mathtools/matrix4x4.hh>

Collaboration diagram for jrlMathTools::Matrix4x4< T >:

Public Member Functions

 Matrix4x4 ()
 Defaut constructor. More...
 
 Matrix4x4 (const T x)
 Constructor form a scalar. More...
 
 Matrix4x4 (const Matrix4x4< T > &v)
 Copy constructor. More...
 
template<typename T2 >
 Matrix4x4 (const Matrix4x4< T2 > &v)
 Hybrid copy constructor. More...
 
T & operator[] (unsigned int i)
 ith element considering the matrix as an array. More...
 
const T & operator[] (unsigned int i) const
 ith element considering the matrix as an array. More...
 
T & operator() (unsigned int i, unsigned int j)
 Access by giving the (i,j) element. More...
 
operator() (unsigned int i, unsigned int j) const
 Access by giving the (i,j) element. More...
 
void setZero (void)
 Set to zero matrix. More...
 
void setIdentity ()
 Set to identity. More...
 
Matrix4x4< T > operator+ (const Matrix4x4< T > &B) const
 Addition operator. More...
 
Matrix4x4< T > operator- (const Matrix4x4< T > &B) const
 Substraction operator. More...
 
Matrix4x4< T > operator* (const Matrix4x4< T > &B) const
 Multiplication operator with another matrix. More...
 
void CeqthismulB (const Matrix4x4< T > &B, Matrix4x4< T > &C) const
 
void CeqthismulB (const Vector4D< T > &B, Vector4D< T > &C) const
 
Vector3D< T > operator* (const Vector3D< T > &B) const
 Multiplication operator with another vector. More...
 
Vector4D< T > operator* (const Vector4D< T > &B) const
 Multiplication operator with a vector 4d. More...
 
Matrix4x4< T > operator* (const T &r) const
 Multiplication operator with a constant. More...
 
Matrix4x4< T > Transpose () const
 Transposition. More...
 
void Inversion (Matrix4x4 &A) const
 Inversion. More...
 
Matrix4x4< T > Inversion ()
 Inversion. More...
 
determinant () const
 Determinant. More...
 
trace () const
 
void operator+= (const Matrix3x3< T > &B)
 Self matrix addition. More...
 
void operator-= (const Matrix4x4< T > &B)
 Local matrix subtraction. More...
 
void operator*= (const Matrix4x4< T > &B)
 Local matrix multiplication. More...
 
void operator*= (const T &t)
 Local matrix multiplication. More...
 
std::ostream & display (std::ostream &os) const
 

Public Attributes

m [16]
 The data array. More...
 

Detailed Description

template<typename T>
struct jrlMathTools::Matrix4x4< T >

Generic 4x4 matrix.

Constructor & Destructor Documentation

◆ Matrix4x4() [1/4]

template<typename T >
jrlMathTools::Matrix4x4< T >::Matrix4x4 ( )
inline

Defaut constructor.

References jrlMathTools::Matrix4x4< T >::m.

◆ Matrix4x4() [2/4]

template<typename T >
jrlMathTools::Matrix4x4< T >::Matrix4x4 ( const T  x)
inline

Constructor form a scalar.

References jrlMathTools::Matrix4x4< T >::m.

◆ Matrix4x4() [3/4]

template<typename T >
jrlMathTools::Matrix4x4< T >::Matrix4x4 ( const Matrix4x4< T > &  v)
inline

Copy constructor.

References jrlMathTools::Matrix4x4< T >::m.

◆ Matrix4x4() [4/4]

template<typename T >
template<typename T2 >
jrlMathTools::Matrix4x4< T >::Matrix4x4 ( const Matrix4x4< T2 > &  v)
inline

Hybrid copy constructor.

References jrlMathTools::Matrix4x4< T >::m.

Member Function Documentation

◆ CeqthismulB() [1/2]

template<typename T >
void jrlMathTools::Matrix4x4< T >::CeqthismulB ( const Matrix4x4< T > &  B,
Matrix4x4< T > &  C 
) const
inline

◆ CeqthismulB() [2/2]

◆ determinant()

template<typename T >
T jrlMathTools::Matrix4x4< T >::determinant ( ) const
inline

◆ display()

template<typename T >
std::ostream& jrlMathTools::Matrix4x4< T >::display ( std::ostream &  os) const
inline

◆ Inversion() [1/2]

template<typename T >
void jrlMathTools::Matrix4x4< T >::Inversion ( Matrix4x4< T > &  A) const
inline

◆ Inversion() [2/2]

template<typename T >
Matrix4x4<T> jrlMathTools::Matrix4x4< T >::Inversion ( )
inline

◆ operator()() [1/2]

template<typename T >
T& jrlMathTools::Matrix4x4< T >::operator() ( unsigned int  i,
unsigned int  j 
)
inline

Access by giving the (i,j) element.

References jrlMathTools::Matrix4x4< T >::m.

◆ operator()() [2/2]

template<typename T >
T jrlMathTools::Matrix4x4< T >::operator() ( unsigned int  i,
unsigned int  j 
) const
inline

Access by giving the (i,j) element.

References jrlMathTools::Matrix4x4< T >::m.

◆ operator*() [1/4]

template<typename T >
Matrix4x4<T> jrlMathTools::Matrix4x4< T >::operator* ( const Matrix4x4< T > &  B) const
inline

Multiplication operator with another matrix.

References jrlMathTools::Matrix4x4< T >::m.

◆ operator*() [2/4]

template<typename T >
Vector3D<T> jrlMathTools::Matrix4x4< T >::operator* ( const Vector3D< T > &  B) const
inline

◆ operator*() [3/4]

template<typename T >
Vector4D<T> jrlMathTools::Matrix4x4< T >::operator* ( const Vector4D< T > &  B) const
inline

◆ operator*() [4/4]

template<typename T >
Matrix4x4<T> jrlMathTools::Matrix4x4< T >::operator* ( const T &  r) const
inline

Multiplication operator with a constant.

References jrlMathTools::Matrix4x4< T >::m.

◆ operator*=() [1/2]

template<typename T >
void jrlMathTools::Matrix4x4< T >::operator*= ( const Matrix4x4< T > &  B)
inline

Local matrix multiplication.

References jrlMathTools::Matrix4x4< T >::m.

◆ operator*=() [2/2]

template<typename T >
void jrlMathTools::Matrix4x4< T >::operator*= ( const T &  t)
inline

Local matrix multiplication.

References jrlMathTools::Matrix4x4< T >::m.

◆ operator+()

template<typename T >
Matrix4x4<T> jrlMathTools::Matrix4x4< T >::operator+ ( const Matrix4x4< T > &  B) const
inline

Addition operator.

References jrlMathTools::Matrix4x4< T >::m.

◆ operator+=()

template<typename T >
void jrlMathTools::Matrix4x4< T >::operator+= ( const Matrix3x3< T > &  B)
inline

Self matrix addition.

References jrlMathTools::Matrix3x3< T >::m, and jrlMathTools::Matrix4x4< T >::m.

◆ operator-()

template<typename T >
Matrix4x4<T> jrlMathTools::Matrix4x4< T >::operator- ( const Matrix4x4< T > &  B) const
inline

Substraction operator.

References jrlMathTools::Matrix4x4< T >::m.

◆ operator-=()

template<typename T >
void jrlMathTools::Matrix4x4< T >::operator-= ( const Matrix4x4< T > &  B)
inline

Local matrix subtraction.

References jrlMathTools::Matrix4x4< T >::m.

◆ operator[]() [1/2]

template<typename T >
T& jrlMathTools::Matrix4x4< T >::operator[] ( unsigned int  i)
inline

ith element considering the matrix as an array.

References jrlMathTools::Matrix4x4< T >::m.

◆ operator[]() [2/2]

template<typename T >
const T& jrlMathTools::Matrix4x4< T >::operator[] ( unsigned int  i) const
inline

ith element considering the matrix as an array.

References jrlMathTools::Matrix4x4< T >::m.

◆ setIdentity()

template<typename T >
void jrlMathTools::Matrix4x4< T >::setIdentity ( )
inline

◆ setZero()

template<typename T >
void jrlMathTools::Matrix4x4< T >::setZero ( void  )
inline

Set to zero matrix.

References jrlMathTools::Matrix4x4< T >::m.

Referenced by jrlMathTools::Matrix4x4< T >::setIdentity().

◆ trace()

template<typename T >
T jrlMathTools::Matrix4x4< T >::trace ( ) const
inline

◆ Transpose()

template<typename T >
Matrix4x4<T> jrlMathTools::Matrix4x4< T >::Transpose ( ) const
inline

Transposition.

References jrlMathTools::Matrix4x4< T >::m.

Member Data Documentation

◆ m