![]() |
ULIS
dev4.0.7
Utility Library for Imaging Systems
|
The TMatrix3 class provides a simple 3x3 square matrix class for geometry applications. More...
Public Types | |
typedef TVector3< T > | tColumn |
typedef TVector3< T > | tRow |
Public Member Functions | |
TMatrix3 () | |
TMatrix3 (const tColumn &iCol0, const tColumn &iCol1, const tColumn &iCol2) | |
TMatrix3 (const TMatrix3 &iOther) | |
template<typename U > | |
TMatrix3 (const TMatrix3< U > &iOther) | |
TMatrix3 (T iM00, T iM01, T iM02, T iM10, T iM11, T iM12, T iM20, T iM21, T iM22) | |
TMatrix3 (T iValue) | |
TVector2< T > | ApplyHomography (const TVector2< T > &iPoint) const |
T * | Data () |
const T * | Data () const |
void | Decompose (T *oTx, T *oTy, T *oRotation, T *oScaleX, T *oScaleY, T *oSkewX, T *oSkewY) const |
T | Determinant () const |
TMatrix3 | Inverse () const |
bool | operator!= (const TMatrix3 &iOther) const |
TMatrix3 & | operator*= (const TMatrix3 &iOther) |
TMatrix3 & | operator*= (T iValue) |
TMatrix3 & | operator+= (const TMatrix3 &iOther) |
TMatrix3 & | operator+= (T iValue) |
TMatrix3 | operator- () const |
TMatrix3 & | operator-= (const TMatrix3 &iOther) |
TMatrix3 & | operator-= (T iValue) |
TMatrix3 & | operator/= (const TMatrix3 &iOther) |
TMatrix3 & | operator/= (T iValue) |
TMatrix3 & | operator= (const TMatrix3 &iOther) |
bool | operator== (const TMatrix3 &iOther) const |
tColumn & | operator[] (int iIndex) |
const tColumn & | operator[] (int iIndex) const |
TMatrix3 | Transpose () const |
Static Public Member Functions | |
static TMatrix3 | MakeHomography (const TVector2< T > iSrc[], const TVector2< T > iDst[]) |
static TMatrix3 | MakeRotationMatrix (T iAngleRad) |
static TMatrix3 | MakeScaleMatrix (T iScaleX, T iScaleY) |
static TMatrix3 | MakeSkewMatrix (T iSkewX, T iSkewY) |
static TMatrix3 | MakeTranslationMatrix (T iX, T iY) |
The TMatrix3 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.
TMatrix3< T >::TMatrix3 | ( | T | iM00, |
T | iM01, | ||
T | iM02, | ||
T | iM10, | ||
T | iM11, | ||
T | iM12, | ||
T | iM20, | ||
T | iM21, | ||
T | iM22 | ||
) |
Constructor from input cells values.
TMatrix3< T >::TMatrix3 | ( | const tColumn & | iCol0, |
const tColumn & | iCol1, | ||
const tColumn & | iCol2 | ||
) |
Constructor from row vector values.
Conversion constructor from other matrix type.
TVector2< T > TMatrix3< T >::ApplyHomography | ( | const TVector2< T > & | iPoint | ) | const |
Apply the projective perspective transform or homography to the point
T * TMatrix3< T >::Data | ( | ) |
Return a pointer to the base storage.
const T * TMatrix3< T >::Data | ( | ) | const |
Return a pointer to the base storage.
void TMatrix3< T >::Decompose | ( | T * | oTx, |
T * | oTy, | ||
T * | oRotation, | ||
T * | oScaleX, | ||
T * | oScaleY, | ||
T * | oSkewX, | ||
T * | oSkewY | ||
) | const |
Decompose the matrix if it represents an affine transform
T TMatrix3< T >::Determinant | ( | ) | const |
Obtain the determinant of the matrix.
Obtain the inverse of the matrix.
|
static |
Static maker for homography, 2D perspective transform.
Static maker for 2D 3x3 rotation matrix.
Static maker for 2D 3x3 scale matrix.
Static maker for 2D 3x3 skew matrix.
Static maker for 2D 3x3 translation matrix.
Inequality operator.
Unary multiplication operator with matrix.
Unary multiplication operator with value.
Unary addition operator with matrix.
Unary addition operator with value.
Unary substraction operator with matrix.
Unary substraction operator with value.
Unary division operator with matrix.
Unary division operator with value.
Assignment operator from matrix.
Equality operator.
Subscript accessor for matrix columns.
Subscript accessor for const matrix columns.