ML Reference
|
A three by three matrix class of three row vectors. More...
#include <mlMatrix3.h>
Public Types | |
typedef DT | ComponentType |
A typedef to "export" the type of components. | |
Public Member Functions | |
bool | operator< (const Tmat3< DT > &) const |
Dummy "lesser than operator" which always returns false. | |
Tmat3 Constructor, set and get functionality. | |
Tmat3 (const double in00, const double in01, const double in02, const double in10, const double in11, const double in12, const double in20, const double in21, const double in22) | |
Initialize all matrix elements explicitly with scalars, filling it row by row. | |
void | setValues (const float mat[9]) |
Copy contents of mat into *this, row by row. | |
void | getValues (float mat[9]) const |
Copy contents of *this into mat, row by row. | |
void | setValues (const double mat[9]) |
Copy contents of mat into *this, row by row. | |
void | getValues (double mat[9]) const |
Copy contents of *this into mat, row by row. | |
void | setScaleMatrix (const DT scale) |
Set diagonal matrix with scale on diagonal. | |
Constructors, set and get functionality. | |
Tmat3 () | |
Build 3x3 matrix from 9 0 elements. | |
Tmat3 (const DT diagValue) | |
Tmat3 (const Tvec3< DT > &row0, const Tvec3< DT > &row1, const Tvec3< DT > &row2) | |
Build matrix of the three row vectors row0, row1, row2. | |
Tmat3 (const Tmat3< DT > &mat) | |
Copy constructor from the Tmat3 mat. | |
Tmat3 (const float mat[9]) | |
Constructor from 9 floating point values in an array given by mat, row by row. | |
Tmat3 (const double mat[9]) | |
Constructor from 9 double values in an array given by mat, row by row. | |
void | set (DT val) |
Set all values to val. | |
const Tmat3< DT > & | operator= (const Tmat3< DT > &m) |
Assignment of a Tmat3. | |
const Tmat3< DT > & | operator+= (const Tmat3< DT > &m) |
Incrementation by a Tmat3. | |
const Tmat3< DT > & | operator-= (const Tmat3< DT > &m) |
Decrement by a Tmat3. | |
const Tmat3< DT > & | operator*= (const DT d) |
Multiplication by a constant. | |
const Tmat3< DT > & | operator/= (const DT d) |
Division by a constant. Division by zero is not handled and must be avoided by caller. | |
static Tmat3< DT > | getMat (const double val) |
Return a matrix filled with values val. | |
Special Functions | |
DT | det () const |
Determinant. | |
Tmat3 | transpose () const |
Transpose. | |
Tmat3 | inverse (bool *isInvertible=NULL) const |
Returns the inverse. | |
const Tmat3< DT > & | apply (MLDblFuncPtr fct) |
Apply the function fct to each component. | |
Tmat3 | jacobi (Tvec3< DT > &eVal, int &rots) const |
Calculate Jacobi-Decomposition of 3x3 matrix. | |
static Tmat3 | getIdentity () |
Return identity matrix. |
A three by three matrix class of three row vectors.
Definition at line 43 of file mlMatrix3.h.
typedef DT ml::Tmat3< DT >::ComponentType |
A typedef to "export" the type of components.
Reimplemented from ml::FloatingPointMatrix< Tvec3< DT >, 3 >.
Definition at line 49 of file mlMatrix3.h.
Build 3x3 matrix from 9 0 elements.
Definition at line 155 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL.
Definition at line 164 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL.
ml::Tmat3< DT >::Tmat3 | ( | const Tvec3< DT > & | row0, |
const Tvec3< DT > & | row1, | ||
const Tvec3< DT > & | row2 | ||
) | [inline] |
Build matrix of the three row vectors row0, row1, row2.
Definition at line 175 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL.
Copy constructor from the Tmat3 mat.
Definition at line 186 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec3< DT >, 3 >::v.
Constructor from 9 floating point values in an array given by mat, row by row.
Definition at line 197 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL.
Constructor from 9 double values in an array given by mat, row by row.
Definition at line 206 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL.
ml::Tmat3< DT >::Tmat3 | ( | const double | in00, |
const double | in01, | ||
const double | in02, | ||
const double | in10, | ||
const double | in11, | ||
const double | in12, | ||
const double | in20, | ||
const double | in21, | ||
const double | in22 | ||
) | [inline] |
Initialize all matrix elements explicitly with scalars, filling it row by row.
Definition at line 383 of file mlMatrix3.h.
References ML_TRACE_IN.
const Tmat3< DT > & ml::Tmat3< DT >::apply | ( | MLDblFuncPtr | fct | ) | [inline] |
Apply the function fct to each component.
Definition at line 530 of file mlMatrix3.h.
References ML_CATCH_RETHROW, ML_TRACE_IN_TIME_CRITICAL, and ML_TRY.
DT ml::Tmat3< DT >::det | ( | ) | const |
Return identity matrix.
Definition at line 517 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL.
Return a matrix filled with values val.
Definition at line 215 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL.
void ml::Tmat3< DT >::getValues | ( | double | mat[9] | ) | const [inline] |
Copy contents of *this into mat, row by row.
Note that range and precision of the float values may not be sufficient for the double matrix contents.
Definition at line 451 of file mlMatrix3.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
void ml::Tmat3< DT >::getValues | ( | float | mat[9] | ) | const [inline] |
Copy contents of *this into mat, row by row.
Note that range and precision of the float values may not be sufficient for the double matrix contents.
Definition at line 417 of file mlMatrix3.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
Returns the inverse.
Gauss-Jordan elimination with partial pivoting. If a non-NULL Boolean pointer is passed to isInvertible then true is returned in *isInvertible in the case of a successful inversion or false if the inversion is not possible (function return is the identity then). If a NULL pointer is passed as isInvertible the matrix must be invertible, otherwise errors will occur.
Definition at line 795 of file mlMatrix3.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, ML_TRY, and ml::MLInverseMatHelper().
Calculate Jacobi-Decomposition of 3x3 matrix.
The jacobi method is deemed to be an absolutely foolproof method for all real symmetric matrices (however a little bit slower than more sophisticated methods as QR decomposition)
Computes all eigenvalues and eigen vectors of a symmetric 3x3 matrix and returns matrix of normalized eigenvectors. evalues[1,..,3] contains the eigenvalues, rots the number of Jacobi rotations that where required.
evalues[i] <-> (eVec[0][i],eVec[1][i],eVec[2][i])
Definition at line 663 of file mlMatrix3.h.
References ML_ABS, ML_BAD_PARAMETER, ML_CATCH_RETHROW, ML_PRINT_ERROR, ML_TRACE_IN, ML_TRY, and ml::FloatingPointMatrix< Tvec3< DT >, 3 >::v.
Multiplication by a constant.
Definition at line 276 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL.
const Tmat3< DT > & ml::Tmat3< DT >::operator+= | ( | const Tmat3< DT > & | m | ) | [inline] |
Incrementation by a Tmat3.
Definition at line 250 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec3< DT >, 3 >::v.
const Tmat3< DT > & ml::Tmat3< DT >::operator-= | ( | const Tmat3< DT > & | m | ) | [inline] |
Decrement by a Tmat3.
Definition at line 263 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec3< DT >, 3 >::v.
Division by a constant. Division by zero is not handled and must be avoided by caller.
Definition at line 289 of file mlMatrix3.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
Dummy "lesser than operator" which always returns false.
It is needed to make class work with some STL containers on VC7.
Definition at line 100 of file mlMatrix3.h.
Assignment of a Tmat3.
Definition at line 235 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec3< DT >, 3 >::v.
void ml::Tmat3< DT >::set | ( | DT | val | ) | [inline] |
Set all values to val.
Definition at line 226 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL.
void ml::Tmat3< DT >::setScaleMatrix | ( | const DT | scale | ) | [inline] |
Set diagonal matrix with scale on diagonal.
Definition at line 468 of file mlMatrix3.h.
References ML_TRACE_IN.
void ml::Tmat3< DT >::setValues | ( | const double | mat[9] | ) | [inline] |
Copy contents of mat into *this, row by row.
Definition at line 433 of file mlMatrix3.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
void ml::Tmat3< DT >::setValues | ( | const float | mat[9] | ) | [inline] |
Copy contents of mat into *this, row by row.
Definition at line 399 of file mlMatrix3.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
Transpose.
Definition at line 504 of file mlMatrix3.h.
References ML_TRACE_IN_TIME_CRITICAL.
Referenced by ml::operator*().