#include <gmlmatrix2.h>
Public Member Functions | |
T | Det () |
TMatrix2x2< T > | MultVectStr (TVector2< T > &v1, TVector2< T > &v2) |
Constructors | |
TMatrix2x2 () | |
No initialization. | |
TMatrix2x2 (T r) | |
Initialization by diagonal element. | |
TMatrix2x2 (const T *m) | |
Initialization by array of T. | |
TMatrix2x2 (T a00, T a01, T a10, T a11) | |
Direct initialization by components (row order). | |
Access to values | |
T * | RawArray () |
Provide access to internal contents. | |
void | GetValue (T *mp) const |
Copy this matrix mp array (! column-major order). | |
const T * | GetValue () const |
Provide const access to the buffer. | |
void | SetValue (const T *mp) |
Copy data from mp array. | |
void | SetValue (T r) |
Initialization by a diagonal component. | |
T & | operator() (int row, int col) |
access operator (e.g. m(1,0) = 20) | |
const T & | operator() (int row, int col) const |
const access operator (e.g. a = m(1,0)) | |
T & | Elem (int row, int col) |
Return (row, col) element. | |
const T & | Elem (int row, int col) const |
Return const (row, col) element. | |
Row and column access | |
void | SetRow (int r, const TVector2< T > &t) |
Set row r of this matrix to vector t. | |
void | SetColumn (int c, const TVector2< T > &t) |
Set column c of this matrix to vector t. | |
void | GetRow (int r, TVector2< T > &t) const |
Set vector t equal to row r of this matrix. | |
TVector2< T > | GetRow (int r) const |
Return row r. | |
void | GetColumn (int c, TVector2< T > &t) const |
Set vector t equal to column c of this matrix. | |
TVector2< T > | GetColumn (int c) const |
Return column c. | |
Matrix-2-Matrix operations | |
TMatrix2x2< T > & | MultRight (const TMatrix2x2< T > &b) |
Multiplication to matrix b (right). | |
TMatrix2x2< T > & | MultLeft (const TMatrix2x2< T > &b) |
Multiplication to matrix b (left). | |
TMatrix2x2< T > & | operator *= (const TMatrix2x2< T > &mat) |
this *= mat | |
TMatrix2x2< T > & | operator+= (const TMatrix2x2< T > &mat) |
this += mat | |
TMatrix2x2< T > | operator/ (const double d) |
Matrix-2-Vector operations | |
void | MultMatrixVec (const TVector2< T > &src, TVector2< T > &dst) const |
dst = M * src | |
void | MultMatrixVec (TVector2< T > &src_and_dst) const |
src_and_dst = M * src_and_dst | |
void | MultVecMatrix (const TVector2< T > &src, TVector2< T > &dst) const |
dst = src * M | |
void | MultVecMatrix (TVector2< T > &src_and_dst) const |
src_and_dst = src_and_dst * M | |
Matrix-2-Scalar operations | |
TMatrix2x2< T > & | operator *= (const T &r) |
Multiplication by scalar r (diagonal). | |
Miscellaneous | |
void | MakeIdentity () |
Make E-matrix from this one. | |
TMatrix2x2< T > | Inverse () const |
Return an inverse matrix. | |
TMatrix2x2< T > | Transpose () const |
Return transposed matrix. | |
Static Public Member Functions | |
const TMatrix2x2< T > & | Identity () |
Return predefined identity matrix. | |
Protected Attributes | |
T | m [4] |
Friends | |
TMatrix2x2< T > | operator * (const TMatrix2x2< T > &m1, const TMatrix2x2< T > &m2) |
Matrix multiplication (return m1 * m2). | |
bool | operator== (const TMatrix2x2< T > &m1, const TMatrix2x2< T > &m2) |
Equality operator. | |
bool | operator!= (const TMatrix2x2< T > &m1, const TMatrix2x2< T > &m2) |
Unequality operator. | |
Related Functions | |
(Note that these are not member functions.) | |
TMatrix2x2< T_TO > | Conv (const TMatrix2x2< T_FROM > &u) |
Convert TMatrix2x2<T_FROM> to TMatrix2x2<T_TO>. | |
TMatrix2x2< float > | ConvF (const TMatrix2x2< T > &u) |
Convert TMatrix2x2<T> to TMatrix2x2<float>. | |
TMatrix2x2< double > | ConvD (const TMatrix2x2< T > &u) |
Convert TMatrix2x2<T> to TMatrix2x2<double>. |
T | - template type of matrix elements |
a0 a2 a1 a3
|
Provide access to internal contents.
|