ULIS  dev4.0.7
Utility Library for Imaging Systems
Public Types | Public Member Functions | List of all members
TMatrix4< T > Class Template Reference

The TMatrix4 class provides a simple 4x4 square matrix class for geometry applications. More...

Public Types

typedef TVector4< T > tColumn
 
typedef TVector4< T > tRow
 

Public Member Functions

 TMatrix4 ()
 
 TMatrix4 (const tColumn &iCol0, const tColumn &iCol1, const tColumn &iCol2, const tColumn &iCol3)
 
 TMatrix4 (const TMatrix4 &iOther)
 
template<typename U >
 TMatrix4 (const TMatrix4< U > &iOther)
 
 TMatrix4 (T iM00, T iM01, T iM02, T iM03, T iM10, T iM11, T iM12, T iM13, T iM20, T iM21, T iM22, T iM23, T iM30, T iM31, T iM32, T iM33)
 
 TMatrix4 (T iValue)
 
T * Data ()
 
const T * Data () const
 
Determinant () const
 
TMatrix4 Inverse () const
 
bool operator!= (const TMatrix4 &iOther)
 
TMatrix4operator*= (const TMatrix4 &iOther)
 
TMatrix4operator*= (T iValue)
 
TMatrix4operator+= (const TMatrix4 &iOther)
 
TMatrix4operator+= (T iValue)
 
TMatrix4 operator- () const
 
TMatrix4operator-= (const TMatrix4 &iOther)
 
TMatrix4operator-= (T iValue)
 
TMatrix4operator/= (const TMatrix4 &iOther)
 
TMatrix4operator/= (T iValue)
 
TMatrix4operator= (const TMatrix4 &iOther)
 
bool operator== (const TMatrix4 &iOther)
 
tColumnoperator[] (int iIndex)
 
const tColumnoperator[] (int iIndex) const
 
TMatrix4 Transpose () const
 

Detailed Description

template<typename T>
class TMatrix4< T >

The TMatrix4 class is a template class that provides basic matrix functionnalities, it can be used with any numeric types, ranging from integer values to floating point values.

TMatrix3 are column-major ordered.

Member Typedef Documentation

◆ tColumn

template<typename T >
typedef TVector4< T > TMatrix4< T >::tColumn

◆ tRow

template<typename T >
typedef TVector4< T > TMatrix4< T >::tRow

Constructor & Destructor Documentation

◆ TMatrix4() [1/6]

template<typename T >
TMatrix4< T >::TMatrix4 ( )

Default constructor ( identity matrix ).

◆ TMatrix4() [2/6]

template<typename T >
TMatrix4< T >::TMatrix4 ( iValue)

Constructor from input diagonal value.

◆ TMatrix4() [3/6]

template<typename T >
TMatrix4< T >::TMatrix4 ( iM00,
iM01,
iM02,
iM03,
iM10,
iM11,
iM12,
iM13,
iM20,
iM21,
iM22,
iM23,
iM30,
iM31,
iM32,
iM33 
)

Constructor from input cells values.

◆ TMatrix4() [4/6]

template<typename T >
TMatrix4< T >::TMatrix4 ( const tColumn iCol0,
const tColumn iCol1,
const tColumn iCol2,
const tColumn iCol3 
)

Constructor from row vector values.

◆ TMatrix4() [5/6]

template<typename T >
TMatrix4< T >::TMatrix4 ( const TMatrix4< T > &  iOther)

Copy constructor.

◆ TMatrix4() [6/6]

template<typename T >
template<typename U >
TMatrix4< T >::TMatrix4 ( const TMatrix4< U > &  iOther)

Conversion constructor from other matrix type.

Member Function Documentation

◆ Data() [1/2]

template<typename T >
T * TMatrix4< T >::Data ( )

Return a pointer to the base storage.

◆ Data() [2/2]

template<typename T >
const T * TMatrix4< T >::Data ( ) const

Return a pointer to the base storage.

◆ Determinant()

template<typename T >
T TMatrix4< T >::Determinant ( ) const

Obtain the determinant of the matrix.

◆ Inverse()

template<typename T >
TMatrix4< T > TMatrix4< T >::Inverse ( ) const

Obtain the inverse of the matrix.

◆ operator!=()

template<typename T >
bool TMatrix4< T >::operator!= ( const TMatrix4< T > &  iOther)

Inequality operator.

◆ operator*=() [1/2]

template<typename T >
TMatrix4< T > & TMatrix4< T >::operator*= ( const TMatrix4< T > &  iOther)

Unary multiplication operator with matrix.

◆ operator*=() [2/2]

template<typename T >
TMatrix4< T > & TMatrix4< T >::operator*= ( iValue)

Unary multiplication operator with value.

◆ operator+=() [1/2]

template<typename T >
TMatrix4< T > & TMatrix4< T >::operator+= ( const TMatrix4< T > &  iOther)

Unary addition operator with matrix.

◆ operator+=() [2/2]

template<typename T >
TMatrix4< T > & TMatrix4< T >::operator+= ( iValue)

Unary addition operator with value.

◆ operator-()

template<typename T >
TMatrix4< T > TMatrix4< T >::operator- ( ) const

Unary negative operator.

◆ operator-=() [1/2]

template<typename T >
TMatrix4< T > & TMatrix4< T >::operator-= ( const TMatrix4< T > &  iOther)

Unary substraction operator with matrix.

◆ operator-=() [2/2]

template<typename T >
TMatrix4< T > & TMatrix4< T >::operator-= ( iValue)

Unary substraction operator with value.

◆ operator/=() [1/2]

template<typename T >
TMatrix4< T > & TMatrix4< T >::operator/= ( const TMatrix4< T > &  iOther)

Unary division operator with matrix.

◆ operator/=() [2/2]

template<typename T >
TMatrix4< T > & TMatrix4< T >::operator/= ( iValue)

Unary division operator with value.

◆ operator=()

template<typename T >
TMatrix4< T > & TMatrix4< T >::operator= ( const TMatrix4< T > &  iOther)

Assignment operator from matrix.

◆ operator==()

template<typename T >
bool TMatrix4< T >::operator== ( const TMatrix4< T > &  iOther)

Equality operator.

◆ operator[]() [1/2]

template<typename T >
TMatrix4< T >::tColumn & TMatrix4< T >::operator[] ( int  iIndex)

Subscript accessor for matrix columns.

◆ operator[]() [2/2]

template<typename T >
const TMatrix4< T >::tColumn & TMatrix4< T >::operator[] ( int  iIndex) const

Subscript accessor for const matrix columns.

◆ Transpose()

template<typename T >
TMatrix4< T > TMatrix4< T >::Transpose ( ) const

Obtain the transpose of the matrix.