#include <omatrix.h>
Collaboration diagram for NUM::OMatrix< T >:
Public Types | |
enum | _Add { Add } |
Dummy enums for constructor selection; mostly internal use. More... | |
enum | _Sub { Sub } |
enum | _Mul { Mul } |
enum | _Div { Div } |
enum | _Null { Null } |
enum | _Ident { Ident, Identity } |
enum | _Scale { Scale } |
enum | _Translate { Translate } |
enum | _Rotate { Rotate } |
enum | _Invers { Invers } |
enum | _Transpose { Transpose } |
Public Member Functions | |
OMatrix () | |
Default constructor does not initialize the variables. | |
OMatrix (const OMatrix &a) | |
Copy-constructor as usual. | |
OMatrix (enum _Null) | |
Construct matrix with all elements set to 0. | |
OMatrix (enum _Ident) | |
Construct identitiy matrix. | |
OMatrix (T m00, T m01, T m02, T m03, T m10, T m11, T m12, T m13, T m20, T m21, T m22, T m23, T m30, T m31, T m32, T m33) | |
Construct a matrix with specified values, row-by-row. | |
OMatrix (enum _Add, const OMatrix< T > &a, const OMatrix< T > &b) | |
Construct matrix as sum of two passed matrices. | |
OMatrix (enum _Sub, const OMatrix< T > &a, const OMatrix< T > &b) | |
Construct matrix as difference of two passed matrices. | |
OMatrix (enum _Mul, const OMatrix< T > &a, T b) | |
Construct matrix as multiplication of matrix a with scalar b. | |
OMatrix (enum _Div, const OMatrix< T > &a, T b) | |
Construct matrix as division of matrix a by scalar b. | |
OMatrix (enum _Mul, const OMatrix< T > &a, const OMatrix< T > &b) | |
Construct matrix as multiplication of matrix a with matrix b. | |
OMatrix (enum _Scale, T f) | |
Construct scaling transform matrix,. | |
OMatrix (enum _Scale, const Vector3< T > &f) | |
Construct scaling transform matrix,. | |
OMatrix (enum _Translate, const Vector3< T > &d) | |
Construct translation transform matrix,. | |
OMatrix (enum _Rotate, const Vector3< T > &axis, T angle) | |
Construct rotation transform matrix; USE ONLY for normalized axis! | |
OMatrix (enum _Invers, const OMatrix< T > &a) | |
Construct matrix which is inversion of passed matrix. | |
OMatrix (enum _Transpose, const OMatrix< T > &a) | |
~OMatrix () | |
Destructor (a no-op). | |
T * | operator[] (int r) |
const T * | operator[] (int r) const |
int | nrows () const |
Get number of rows of object matrix. This is always 3. | |
int | ncols () const |
Get number of columns of object matrix. This is always 4. | |
OMatrix & | operator= (const OMatrix &a) |
Assignment operator: Copy passed matrix. | |
OMatrix & | zero () |
Set matrix to zero. | |
OMatrix & | identity () |
Set matrix to identity matrix. | |
OMatrix & | operator+= (const OMatrix &a) |
Add a matrix to this one:. | |
OMatrix & | operator-= (const OMatrix &a) |
Subtract a matrix from this one:. | |
OMatrix & | operator *= (T a) |
Multiply matrix with sclar value:. | |
OMatrix & | operator/= (T a) |
OMatrix & | operator *= (const OMatrix &b) |
Multiply this matrix with another matrix from LEFT. | |
OMatrix & | operator/= (const OMatrix &a) |
Multiply this matrix with another matrix from RIGHT. | |
OMatrix & | neg () |
Change the sign of every element:. | |
OMatrix & | transpose () |
T | determinant () const |
bool | IsNull (T epsilon) const |
Private Member Functions | |
void | _copy (const OMatrix &a) |
void | _zero () |
void | _identity () |
Private Attributes | |
T | m [3][4] |
Internally stores the matrix. |
Definition at line 49 of file omatrix.h.
|
Dummy enums for constructor selection; mostly internal use.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Default constructor does not initialize the variables.
|
|
Copy-constructor as usual.
Definition at line 85 of file omatrix.h. References NUM::OMatrix< T >::_copy(). |
|
Construct matrix with all elements set to 0.
Definition at line 87 of file omatrix.h. References NUM::OMatrix< T >::_zero(). |
|
Construct identitiy matrix.
Definition at line 89 of file omatrix.h. References NUM::OMatrix< T >::_identity(). |
|
Construct a matrix with specified values, row-by-row.
Definition at line 91 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Construct matrix as sum of two passed matrices.
Definition at line 102 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Construct matrix as difference of two passed matrices.
Definition at line 109 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Construct matrix as multiplication of matrix a with scalar b.
Definition at line 116 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Construct matrix as division of matrix a by scalar b.
Definition at line 123 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Construct matrix as multiplication of matrix a with matrix b.
Definition at line 44 of file omatrix.cc. References NUM::OMatrix< T >::m. |
|
Construct scaling transform matrix,.
Definition at line 132 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Construct scaling transform matrix,.
Definition at line 138 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Construct translation transform matrix,.
Definition at line 144 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Construct rotation transform matrix; USE ONLY for normalized axis!
Definition at line 114 of file omatrix.cc. References NUM::angle(), NUM::OMatrix< T >::m, NUM::sincos(), and NUM::sqr(). |
|
Construct matrix which is inversion of passed matrix.
Definition at line 149 of file omatrix.cc. References NUM::OMatrix< T >::m. |
|
Construcz matrix which is transposed version of passed matrix. See the transpose() method for important information. Definition at line 156 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Destructor (a no-op).
|
|
Definition at line 55 of file omatrix.h. References NUM::OMatrix< T >::m. Referenced by NUM::OMatrix< T >::OMatrix(), and NUM::OMatrix< T >::operator=(). |
|
Definition at line 64 of file omatrix.h. References NUM::OMatrix< T >::m. Referenced by NUM::OMatrix< T >::identity(), and NUM::OMatrix< T >::OMatrix(). |
|
Definition at line 61 of file omatrix.h. References NUM::OMatrix< T >::m. Referenced by NUM::OMatrix< T >::OMatrix(), and NUM::OMatrix< T >::zero(). |
|
Compute determinant of the 3x3 rotation part of the matrix: (Note: untested code) Definition at line 290 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Set matrix to identity matrix.
Definition at line 186 of file omatrix.h. References NUM::OMatrix< T >::_identity(). |
|
Compare matrix against 0 with specified epsilon value:
Definition at line 297 of file omatrix.h. References NUM::fabs(), and NUM::OMatrix< T >::m. |
|
Get number of columns of object matrix. This is always 4.
|
|
Change the sign of every element:.
Definition at line 262 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Get number of rows of object matrix. This is always 3.
|
|
Multiply this matrix with another matrix from LEFT.
This operator calculates this := this*b.
Definition at line 61 of file omatrix.cc. References NUM::OMatrix< T >::m. |
|
Multiply matrix with sclar value:.
Definition at line 207 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Add a matrix to this one:.
Definition at line 190 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Subtract a matrix from this one:.
Definition at line 198 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Multiply this matrix with another matrix from RIGHT.
This operator calculates this := a*this.
OMatrix trafo(OMatrix::Ident); trafo/=OMatrix(OMatrix::Scale,fact); trafo/=OMatrix(OMatrix::Translate,vect); which is identical to
If you now compute trafo*vect, the vect will be first scaled and then translated.
Definition at line 85 of file omatrix.cc. References NUM::OMatrix< T >::m. |
|
Divide matrix by scalar value. For speed reasons, you should better multiply with 1/a. Definition at line 215 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Assignment operator: Copy passed matrix.
Definition at line 178 of file omatrix.h. References NUM::OMatrix< T >::_copy(). |
|
Definition at line 168 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Access to the matrix members. Indices [0,1,2][0,1,2,3]. No range check. Definition at line 167 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Transpose matrix.
Definition at line 281 of file omatrix.h. References NUM::OMatrix< T >::m. |
|
Set matrix to zero.
Definition at line 182 of file omatrix.h. References NUM::OMatrix< T >::_zero(). |
|
Internally stores the matrix.
Definition at line 53 of file omatrix.h. Referenced by NUM::OMatrix< T >::_copy(), NUM::OMatrix< T >::_identity(), NUM::OMatrix< T >::_zero(), NUM::OMatrix< T >::determinant(), NUM::OMatrix< T >::IsNull(), NUM::OMatrix< T >::neg(), NUM::OMatrix< T >::OMatrix(), NUM::OMatrix< T >::operator *=(), NUM::OMatrix< T >::operator+=(), NUM::OMatrix< T >::operator-=(), NUM::OMatrix< T >::operator/=(), NUM::OMatrix< T >::operator[](), and NUM::OMatrix< T >::transpose(). |