#include <Matrix4x4.hpp>
Inherits Matrix< T >.

Public Member Functions | |
| Matrix4x4 (void) | |
| Default constructor Create a 4*4 matrix set to identity. | |
| Matrix4x4 (const Matrix4x4< T > &m) | |
| Copy constructor Create a matrix by copying the input matrix. | |
| Matrix4x4 (const Matrix< T > &m) | |
| Constructor form Matrix Create a matrix by copying the input matrix. | |
| Matrix4x4 (const Matrix4x4< T > *m) | |
| Copy constructor Create a matrix by copying the input matrix. | |
| Matrix4x4 (const T &d) | |
| Create a 4*4 matrix Create a 4*4 matrix and use the value d to set the data of the matrix. | |
| Matrix4x4 (const T *d) | |
| create a 4*4 matrix create a 4*4 matrix and set data by using the values array d | |
| Matrix4x4 (const Vector< T > &v, const bool &setasrows=true) | |
| Create a 4*4 or matrix Create a matrix using the vector v. | |
| Matrix4x4 (const Vector4< T > *v, const bool &setasrows=true) | |
| Create a 4*4 matrix Create a matrix using the pointer on the vector v. | |
| ~Matrix4x4 (void) | |
| Destructor. | |
| Vector4< T > | operator* (const Vector4< T > &v) const |
| Multiplies the matrix with a vector. | |
| size_t | rows (void) const |
| Returns the number of rows of the matrix. | |
| size_t | columns (void) const |
| Returns the number of columns of the matrix. | |
| Matrix4x4< T > & | transpose (void) |
| Transposes inplace the current matrix. | |
| void | setIdentity (void) |
| sets the matrix to identity | |
| bool | isSquare (void) const |
| Check if it is a square matrix or not. | |
| Matrix4x4< T > & | operator= (const Matrix4x4< T > &m) |
| Allocate the matrix m to this matrix. | |
| Matrix4x4< T > | operator+ (const Matrix4x4< T > &m) const |
| Adds two matrices. | |
| Matrix4x4< T > | operator- (const Matrix4x4< T > &m) const |
| Subtracts two matrices. | |
| Matrix4x4< T > | operator/ (const T &d) const |
| Divides the matrix with a value. | |
| Matrix4x4< T > | operator* (const Matrix4x4< T > &m) const |
| Multiplies two matrices. | |
| Matrix4x4< T > | operator* (const T &d) const |
| Multiplies the matrix with a value. | |
| Matrix4x4< T > | operator- (void) const |
| Compute opposite of the matrix. | |
| Matrix4x4< T > & | operator+= (const Matrix4x4< T > &m) |
| Adds the matrix with a matrix. | |
| Matrix4x4< T > & | operator-= (const Matrix4x4< T > &m) |
| Subtracts the matrix with a matrix. | |
| Matrix4x4< T > & | operator/= (const T &d) |
| Divides the matrix with a value All values of the matrix are divided by d. | |
| Matrix4x4< T > & | operator*= (const Matrix4x4< T > &m) |
| Multiplies the matrix with a matrix. | |
| Matrix4x4< T > & | operator*= (const T &d) |
| Multiplies the matrix with a value. | |
| Vector4< T > | getRow (const unsigned int &row) const |
| Returns a vector with values from a specific row. | |
| Vector4< T > | getColumn (const unsigned int &column) const |
| Returns a vector with values from a specific column. | |
| Vector4< T > | getDiagonal (void) const |
| Return the diagonal of the matrix as a vector. | |
| Matrix4x4< T > | getTranspose (void) const |
| Transposes a copy of the matrix Creates and transposes a copy of this matrix. | |
| Matrix4x4< T > & | power (const unsigned int &p) |
| Computes inplace the power p of this matrix. | |
| T | trace (void) const |
| Trace of the Matrix. | |
Definition at line 38 of file Matrix4x4.hpp.
| kn::Matrix4x4< T >::Matrix4x4 | ( | void | ) | [inline] |
Default constructor Create a 4*4 matrix set to identity.
Definition at line 48 of file Matrix4x4.hpp.
| kn::Matrix4x4< T >::Matrix4x4 | ( | const Matrix4x4< T > & | m | ) | [inline] |
Copy constructor Create a matrix by copying the input matrix.
| m | the matrix to copy |
Definition at line 58 of file Matrix4x4.hpp.
| kn::Matrix4x4< T >::Matrix4x4 | ( | const Matrix< T > & | m | ) | [inline] |
Constructor form Matrix Create a matrix by copying the input matrix.
| m | the matrix to copy |
| MathException | if m dimensions are differents |
Definition at line 378 of file Matrix4x4.hpp.
| kn::Matrix4x4< T >::Matrix4x4 | ( | const Matrix4x4< T > * | m | ) | [inline] |
Copy constructor Create a matrix by copying the input matrix.
| m | the pointer to the matrix to copy |
| MathException | pointer is null |
Definition at line 318 of file Matrix4x4.hpp.
| kn::Matrix4x4< T >::Matrix4x4 | ( | const T & | d | ) | [inline] |
Create a 4*4 matrix Create a 4*4 matrix and use the value d to set the data of the matrix.
| d | value used to set data of the matrix |
Definition at line 84 of file Matrix4x4.hpp.
| kn::Matrix4x4< T >::Matrix4x4 | ( | const T * | d | ) | [inline] |
create a 4*4 matrix create a 4*4 matrix and set data by using the values array d
| d | pointer to an array of data |
| MathException | d is null |
Definition at line 329 of file Matrix4x4.hpp.
| kn::Matrix4x4< T >::Matrix4x4 | ( | const Vector< T > & | v, | |
| const bool & | setasrows = true | |||
| ) | [inline] |
Create a 4*4 or matrix Create a matrix using the vector v.
if setasrows is set to true, v is used to fill rows of the matrix, v is used to fill columns otherwise
| v | a vector | |
| setasrows | defined if vector is used to fill columns or rows |
| MathException | size of vector is different of 3 |
Definition at line 339 of file Matrix4x4.hpp.
| kn::Matrix4x4< T >::Matrix4x4 | ( | const Vector4< T > * | v, | |
| const bool & | setasrows = true | |||
| ) | [inline] |
Create a 4*4 matrix Create a matrix using the pointer on the vector v.
If setasrows is set to true, v is used to fill rows of the matrix, v is used to fill columns otherwise
| v | a pointer on an array of vectors | |
| setasrows | defined if vector is used to fill columns or rows |
| MathException | v is null | |
| MathException | if *v size are different of 3 |
Definition at line 357 of file Matrix4x4.hpp.
| kn::Matrix4x4< T >::~Matrix4x4 | ( | void | ) | [inline] |
| size_t kn::Matrix4x4< T >::columns | ( | void | ) | const [inline] |
Returns the number of columns of the matrix.
Reimplemented from kn::Matrix< T >.
Definition at line 150 of file Matrix4x4.hpp.
| Vector4< T > kn::Matrix4x4< T >::getColumn | ( | const unsigned int & | column | ) | const [inline] |
Returns a vector with values from a specific column.
| column | the number of the column |
| MathException | column is out of bounds |
Reimplemented from kn::Matrix< T >.
Definition at line 584 of file Matrix4x4.hpp.
| Vector4< T > kn::Matrix4x4< T >::getDiagonal | ( | void | ) | const [inline] |
Return the diagonal of the matrix as a vector.
Reimplemented from kn::Matrix< T >.
Definition at line 566 of file Matrix4x4.hpp.
| Vector4< T > kn::Matrix4x4< T >::getRow | ( | const unsigned int & | row | ) | const [inline] |
Returns a vector with values from a specific row.
| row | the number of the row |
| MathException | row is out of bounds |
Reimplemented from kn::Matrix< T >.
Definition at line 574 of file Matrix4x4.hpp.
| Matrix4x4<T> kn::Matrix4x4< T >::getTranspose | ( | void | ) | const [inline] |
Transposes a copy of the matrix Creates and transposes a copy of this matrix.
The current matrix is unchanged
Reimplemented from kn::Matrix< T >.
Definition at line 293 of file Matrix4x4.hpp.
| bool kn::Matrix4x4< T >::isSquare | ( | void | ) | const [inline] |
Check if it is a square matrix or not.
Reimplemented from kn::Matrix< T >.
Definition at line 169 of file Matrix4x4.hpp.
| Matrix4x4< T > kn::Matrix4x4< T >::operator* | ( | const T & | d | ) | const [inline] |
Multiplies the matrix with a value.
| d | the value multiplied with this matrix |
Reimplemented from kn::Matrix< T >.
Definition at line 491 of file Matrix4x4.hpp.
| Matrix4x4< T > kn::Matrix4x4< T >::operator* | ( | const Matrix4x4< T > & | m | ) | const [inline] |
Multiplies two matrices.
| m | the matrix multiplied with this matrix |
| MathException | matrice size is incorrect |
Definition at line 473 of file Matrix4x4.hpp.
| Vector4< T > kn::Matrix4x4< T >::operator* | ( | const Vector4< T > & | v | ) | const [inline] |
Multiplies the matrix with a vector.
| v | the vector multiplied with this matrix |
| MathException | vector size is incorrect |
Definition at line 387 of file Matrix4x4.hpp.
| Matrix4x4< T > & kn::Matrix4x4< T >::operator*= | ( | const T & | d | ) | [inline] |
Multiplies the matrix with a value.
| d | the value multiplied with this matrix |
Reimplemented from kn::Matrix< T >.
Definition at line 545 of file Matrix4x4.hpp.
| Matrix4x4< T > & kn::Matrix4x4< T >::operator*= | ( | const Matrix4x4< T > & | m | ) | [inline] |
Multiplies the matrix with a matrix.
| m | the matrix multiplied with this matrix |
| MathException | matrix size is incorrect |
Definition at line 529 of file Matrix4x4.hpp.
| Matrix4x4< T > kn::Matrix4x4< T >::operator+ | ( | const Matrix4x4< T > & | m | ) | const [inline] |
Adds two matrices.
| m | the matrix added to this matrix |
| MathException | matrix size is incorrect |
Definition at line 449 of file Matrix4x4.hpp.
| Matrix4x4< T > & kn::Matrix4x4< T >::operator+= | ( | const Matrix4x4< T > & | m | ) | [inline] |
Adds the matrix with a matrix.
| m | the matrix added with this matrix |
| MathException | matrix size is incorrect |
Definition at line 507 of file Matrix4x4.hpp.
| Matrix4x4< T > kn::Matrix4x4< T >::operator- | ( | void | ) | const [inline] |
Compute opposite of the matrix.
Reimplemented from kn::Matrix< T >.
Definition at line 499 of file Matrix4x4.hpp.
| Matrix4x4< T > kn::Matrix4x4< T >::operator- | ( | const Matrix4x4< T > & | m | ) | const [inline] |
Subtracts two matrices.
| m | the matrix subtracted to this matrix |
| MathException | matrix size is incorrect |
Definition at line 457 of file Matrix4x4.hpp.
| Matrix4x4< T > & kn::Matrix4x4< T >::operator-= | ( | const Matrix4x4< T > & | m | ) | [inline] |
Subtracts the matrix with a matrix.
| m | the matrix subtracted with this matrix |
| MathException | matrix size is incorrect |
Definition at line 514 of file Matrix4x4.hpp.
| Matrix4x4< T > kn::Matrix4x4< T >::operator/ | ( | const T & | d | ) | const [inline] |
Divides the matrix with a value.
| d | the value divided with this matrix |
| MathException | d is null |
Reimplemented from kn::Matrix< T >.
Definition at line 465 of file Matrix4x4.hpp.
| Matrix4x4< T > & kn::Matrix4x4< T >::operator/= | ( | const T & | d | ) | [inline] |
Divides the matrix with a value All values of the matrix are divided by d.
| d | the value divided with this matrix |
| MathException | d is null |
Reimplemented from kn::Matrix< T >.
Definition at line 520 of file Matrix4x4.hpp.
| Matrix4x4< T > & kn::Matrix4x4< T >::operator= | ( | const Matrix4x4< T > & | m | ) | [inline] |
Allocate the matrix m to this matrix.
| m | the matrix used to defined this matrix |
| MathException | matrix size is incorrect |
Definition at line 439 of file Matrix4x4.hpp.
| Matrix4x4< T > & kn::Matrix4x4< T >::power | ( | const unsigned int & | p | ) | [inline] |
Computes inplace the power p of this matrix.
| MathException | not a square matrix |
Reimplemented from kn::Matrix< T >.
Definition at line 552 of file Matrix4x4.hpp.
| size_t kn::Matrix4x4< T >::rows | ( | void | ) | const [inline] |
Returns the number of rows of the matrix.
Reimplemented from kn::Matrix< T >.
Definition at line 142 of file Matrix4x4.hpp.
| void kn::Matrix4x4< T >::setIdentity | ( | void | ) | [inline] |
sets the matrix to identity
Reimplemented from kn::Matrix< T >.
Definition at line 410 of file Matrix4x4.hpp.
| T kn::Matrix4x4< T >::trace | ( | void | ) | const [inline] |
Trace of the Matrix.
This represents the sum of each element on the diagonal
Reimplemented from kn::Matrix< T >.
Definition at line 601 of file Matrix4x4.hpp.
| Matrix4x4< T > & kn::Matrix4x4< T >::transpose | ( | void | ) | [inline] |
Transposes inplace the current matrix.
Reimplemented from kn::Matrix< T >.
Definition at line 400 of file Matrix4x4.hpp.
1.5.8