jrlMathTools::Matrix4x4< T > Struct Template Reference

Generic 4x4 matrix. More...

#include <jrl/mathtools/matrix4x4.hh>

List of all members.

Public Member Functions

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

Public Attributes

m [16]
 The data array.

Detailed Description

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

Generic 4x4 matrix.


Constructor & Destructor Documentation

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

Defaut constructor.

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

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

Constructor form a scalar.

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

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

Copy constructor.

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

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

template<typename T>
void jrlMathTools::Matrix4x4< T >::CeqthismulB ( const Matrix4x4< T > &  B,
Matrix4x4< T > &  C 
) const [inline]
template<typename T>
T jrlMathTools::Matrix4x4< T >::determinant ( ) const [inline]
template<typename T>
std::ostream& jrlMathTools::Matrix4x4< T >::display ( std::ostream &  os) const [inline]
template<typename T>
void jrlMathTools::Matrix4x4< T >::Inversion ( Matrix4x4< T > &  A) const [inline]
template<typename T>
Matrix4x4<T> jrlMathTools::Matrix4x4< T >::Inversion ( ) [inline]
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.

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.

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.

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

Multiplication operator with a constant.

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

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

Local matrix multiplication.

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

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

Local matrix multiplication.

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

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

Addition operator.

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

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

Self matrix addition.

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

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

Substraction operator.

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

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

Local matrix subtraction.

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

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.

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.

template<typename T>
void jrlMathTools::Matrix4x4< T >::setIdentity ( ) [inline]
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().

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

Transposition.

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


Member Data Documentation

 All Classes Namespaces Files Functions Variables Typedefs Defines