![]() |
Gamedev Framework (gf)
0.7.0
A C++14 framework for 2D games
|
A 4x4 matrix. More...
#include <gf/Matrix.h>
Public Types | |
| using | value_type = T |
| The value type of the elements of the matrix. More... | |
Public Member Functions | |
| Matrix ()=default | |
| Default constructor. More... | |
| constexpr | Matrix (ZeroType) noexcept |
| constexpr | Matrix (T val) noexcept |
| constexpr | Matrix (const T *array) |
| constexpr | Matrix (T e11, T e12, T e13, T e14, T e21, T e22, T e23, T e24, T e31, T e32, T e33, T e34, T e41, T e42, T e43, T e44) noexcept |
| Constructor that takes all the elements. More... | |
| const T * | getData () const noexcept |
| T * | getData () noexcept |
| T | operator() (std::size_t row, std::size_t col) const |
| T & | operator() (std::size_t row, std::size_t col) |
| constexpr void | zero () noexcept |
Public Attributes | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| union gf::Matrix< T, 4, 4 >:: { ... } | |
| T | xx |
| T | m11 |
| T | xy |
| T | m12 |
| T | xz |
| T | m13 |
| T | xw |
| T | m14 |
| T | yx |
| T | m21 |
| T | yy |
| T | m22 |
| T | yz |
| T | m23 |
| T | yw |
| T | m24 |
| T | zx |
| T | m31 |
| T | zy |
| T | m32 |
| T | zz |
| T | m33 |
| T | zw |
| T | m34 |
| T | wx |
| T | m41 |
| T | wy |
| T | m42 |
| T | wz |
| T | m43 |
| T | ww |
| T | m44 |
Static Public Attributes | |
| static constexpr std::size_t | Rows = 4 |
| The number of rows in the matrix. More... | |
| static constexpr std::size_t | Cols = 4 |
| The number of columns in the matrix. More... | |
A 4x4 matrix.
This specialization of gf::Matrix handles affine transformation of 3D vectors (using homogeneous coordinates).
Each element of the matrix can be accessed through a name with a double letter indicating the column and row of the element (e.g. xy indicates the first row and second column).
A common typedef is defined:
float as T | using gf::Matrix< T, 4, 4 >::value_type = T |
The value type of the elements of the matrix.
|
default |
Default constructor.
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicit |
|
inlinenoexcept |
Constructor that takes all the elements.
| e11 | The element in the first row and first column |
| e12 | The element in the first row and second column |
| e13 | The element in the first row and third column |
| e14 | The element in the first row and fourth column |
| e21 | The element in the second row and first column |
| e22 | The element in the second row and second column |
| e23 | The element in the second row and third column |
| e24 | The element in the second row and fourth column |
| e31 | The element in the third row and first column |
| e32 | The element in the third row and second column |
| e33 | The element in the third row and third column |
| e34 | The element in the third row and fourth column |
| e41 | The element in the fourth row and first column |
| e42 | The element in the fourth row and second column |
| e43 | The element in the fourth row and third column |
| e44 | The element in the fourth row and fourth column |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inlinenoexcept |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
| union { ... } |
|
static |
The number of columns in the matrix.
| T gf::Matrix< T, 4, 4 >::m11 |
| T gf::Matrix< T, 4, 4 >::m12 |
| T gf::Matrix< T, 4, 4 >::m13 |
| T gf::Matrix< T, 4, 4 >::m14 |
| T gf::Matrix< T, 4, 4 >::m21 |
| T gf::Matrix< T, 4, 4 >::m22 |
| T gf::Matrix< T, 4, 4 >::m23 |
| T gf::Matrix< T, 4, 4 >::m24 |
| T gf::Matrix< T, 4, 4 >::m31 |
| T gf::Matrix< T, 4, 4 >::m32 |
| T gf::Matrix< T, 4, 4 >::m33 |
| T gf::Matrix< T, 4, 4 >::m34 |
| T gf::Matrix< T, 4, 4 >::m41 |
| T gf::Matrix< T, 4, 4 >::m42 |
| T gf::Matrix< T, 4, 4 >::m43 |
| T gf::Matrix< T, 4, 4 >::m44 |
|
static |
The number of rows in the matrix.
| T gf::Matrix< T, 4, 4 >::ww |
| T gf::Matrix< T, 4, 4 >::wx |
| T gf::Matrix< T, 4, 4 >::wy |
| T gf::Matrix< T, 4, 4 >::wz |
| T gf::Matrix< T, 4, 4 >::xw |
| T gf::Matrix< T, 4, 4 >::xx |
| T gf::Matrix< T, 4, 4 >::xy |
| T gf::Matrix< T, 4, 4 >::xz |
| T gf::Matrix< T, 4, 4 >::yw |
| T gf::Matrix< T, 4, 4 >::yx |
| T gf::Matrix< T, 4, 4 >::yy |
| T gf::Matrix< T, 4, 4 >::yz |
| T gf::Matrix< T, 4, 4 >::zw |
| T gf::Matrix< T, 4, 4 >::zx |
| T gf::Matrix< T, 4, 4 >::zy |
| T gf::Matrix< T, 4, 4 >::zz |
1.8.13