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.

◆ Matrix4x4() [2/4]

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

Constructor form a scalar.

◆ 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]

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

◆ determinant()

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

Determinant.

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

◆ 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.

◆ 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.

◆ operator*() [1/4]

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

Multiplication operator with another matrix.

◆ operator*() [2/4]

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

Multiplication operator with another vector.

References jrlMathTools::Vector3D< T >::m_x, jrlMathTools::Vector3D< T >::m_y, and jrlMathTools::Vector3D< T >::m_z.

◆ 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.

◆ operator*=() [1/2]

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

Local matrix multiplication.

◆ operator*=() [2/2]

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

Local matrix multiplication.

◆ operator+()

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

Addition operator.

◆ operator+=()

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

Self matrix addition.

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

◆ operator-()

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

Substraction operator.

◆ operator-=()

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

Local matrix subtraction.

◆ operator[]() [1/2]

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

ith element considering the matrix as an array.

◆ 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.

◆ setIdentity()

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

Set to identity.

References jrlMathTools::Matrix4x4< T >::setZero().

◆ setZero()

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

Set to zero matrix.

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.

Member Data Documentation

◆ m

template<typename T >
T jrlMathTools::Matrix4x4< T >::m[16]