ML Reference
|
Declaration of matrix type traits: More...
#include <mlMatrix2.h>
Public Types | |
typedef DT | ComponentType |
A typedef to "export" the type of components. | |
Public Types inherited from ml::FloatingPointMatrix< Tvec2< DT >, 2 > | |
enum | |
This enum grants access to the row count during compile time, e.g. More... | |
enum | |
This enum grants access to the row count during compile time, e.g. More... | |
enum | |
This enum grants access to the number of values in the matrix, e.g. More... | |
typedef VectorT::ComponentType | ComponentType |
A typedef to "export" the type of sub-components. | |
typedef Tvec2< DT > | VectorType |
A typedef to "export" the type of component vector. | |
Public Member Functions | |
bool | operator< (const Tmat2< DT > &) const |
Dummy "lesser than operator" which always returns false. | |
Operators and indexing functionality. | |
const Tmat2< DT > & | operator= (const Tmat2< DT > &m) |
Assigns from a Tmat2. | |
const Tmat2< DT > & | operator+= (const Tmat2< DT > &m) |
Increments by a Tmat2. | |
const Tmat2< DT > & | operator-= (const Tmat2< DT > &m) |
Decrements by a Tmat2. | |
const Tmat2< DT > & | operator*= (const DT d) |
Multiplies by a constant d. | |
const Tmat2< DT > & | operator/= (const DT d) |
Divides by a constant d. Division by zero is not handled and must be avoided by caller. | |
Special functions for class Tmat2. | |
DT | det () const |
Returns the determinant of this matrix. | |
Tmat2< DT > | transpose () const |
Returns the transposed matrix. | |
Tmat2< DT > | inverse (bool *isInvertible=nullptr) const |
const Tmat2< DT > & | apply (MLDblFuncPtr fct) |
Applies the method fct to all vectors of *this and return the matrix. | |
Public Member Functions inherited from ml::FloatingPointMatrix< Tvec2< DT >, 2 > | |
const Tvec2< DT > & | operator[] (const size_t i) const |
Tvec2< DT > & | operator[] (const size_t i) |
ComponentType & | linearIndexed (const size_t idx) |
ComponentType | linearIndexedConst (const size_t idx) const |
ComponentType | compAbsSum () const |
void | setValuesFromPtr (const ComponentType *const values) |
Copies contents from array mat into *this, row by row; type and size must match. | |
void | getValuesToPtr (ComponentType *values) const |
Copies contents of *this into array mat, row by row; type and size must match. | |
Constructors, set and get methods. | |
Tmat2 () | |
Constructs the matrix from 4 zero elements. | |
Tmat2 (const DT diagValue) | |
Tmat2 (const Tvec2< DT > &row0, const Tvec2< DT > &row1) | |
Composes a matrix from the two vectors row0 and row1. | |
Tmat2 (const Tmat2< DT > &mat) | |
Copy constructor from the Tmat2 mat. | |
Tmat2 (const float mat[4]) | |
Constructor from 4 floating point values in an array given by mat, row by row. | |
Tmat2 (const double mat[4]) | |
Constructor from 4 double values in an array given by mat, row by row. | |
Tmat2 (const DT in00, const DT in01, const DT in10, const DT in11) | |
Initializes all matrix elements explicitly with scalars, row by row. | |
void | setValues (const float mat[4]) |
Copies the contents of mat into *this, row by row. | |
void | getValues (float mat[4]) const |
Copies the contents of *this into mat, row by row. | |
void | setValues (const double mat[4]) |
Copies the contents of mat into *this, row by row. | |
void | getValues (double mat[4]) const |
Copies the contents of *this into mat, row by row. | |
void | set (const DT val) |
Sets all values to val. | |
void | setScaleMatrix (const DT scale) |
Sets a diagonal matrix with scale on diagonal. | |
static Tmat2< DT > | getMat (const DT val) |
Returns a matrix filled with values val. | |
static Tmat2< DT > | getIdentity () |
Returns the identity matrix. | |
Additional Inherited Members | |
Protected Attributes inherited from ml::FloatingPointMatrix< Tvec2< DT >, 2 > | |
Tvec2< DT > | v [size] |
The rows constituting the matrix. | |
Declaration of matrix type traits:
A two by two matrix class consisting of 2 row vectors.
Definition at line 34 of file mlMatrix2.h.
typedef DT ml::Tmat2< DT >::ComponentType |
A typedef to "export" the type of components.
Definition at line 39 of file mlMatrix2.h.
|
inline |
Constructs the matrix from 4 zero elements.
Definition at line 149 of file mlMatrix2.h.
|
inline |
Definition at line 156 of file mlMatrix2.h.
|
inline |
Composes a matrix from the two vectors row0 and row1.
Definition at line 165 of file mlMatrix2.h.
Copy constructor from the Tmat2 mat.
Definition at line 174 of file mlMatrix2.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
|
inline |
Constructor from 4 floating point values in an array given by mat, row by row.
Definition at line 182 of file mlMatrix2.h.
|
inline |
Constructor from 4 double values in an array given by mat, row by row.
Definition at line 189 of file mlMatrix2.h.
|
inline |
Initializes all matrix elements explicitly with scalars, row by row.
Definition at line 196 of file mlMatrix2.h.
|
inline |
Applies the method fct to all vectors of *this and return the matrix.
Definition at line 294 of file mlMatrix2.h.
References ml::Tmat2< DT >::apply().
Referenced by ml::Tmat2< DT >::apply().
|
inline |
Returns the determinant of this matrix.
Definition at line 279 of file mlMatrix2.h.
Returns the identity matrix.
Definition at line 256 of file mlMatrix2.h.
Returns a matrix filled with values val.
Definition at line 241 of file mlMatrix2.h.
|
inline |
Copies the 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 233 of file mlMatrix2.h.
|
inline |
Copies the 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 223 of file mlMatrix2.h.
Definition at line 311 of file mlMatrix2.h.
References ML_BAD_PARAMETER, MLValueIs0WOM(), and ml::printTemplateError().
Multiplies by a constant d.
Definition at line 385 of file mlMatrix2.h.
Increments by a Tmat2.
Definition at line 367 of file mlMatrix2.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
Decrements by a Tmat2.
Definition at line 376 of file mlMatrix2.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
Divides by a constant d. Division by zero is not handled and must be avoided by caller.
Definition at line 394 of file mlMatrix2.h.
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 mlMatrix2.h.
Assigns from a Tmat2.
Definition at line 356 of file mlMatrix2.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
|
inline |
Sets all values to val.
Definition at line 249 of file mlMatrix2.h.
|
inline |
Sets a diagonal matrix with scale on diagonal.
Definition at line 263 of file mlMatrix2.h.
|
inline |
Copies the contents of mat into *this, row by row.
Definition at line 213 of file mlMatrix2.h.
|
inline |
Copies the contents of mat into *this, row by row.
Definition at line 205 of file mlMatrix2.h.
Returns the transposed matrix.
Definition at line 286 of file mlMatrix2.h.
Referenced by ml::operator*().