#include <TTauri/Foundation/mat.hpp>
|
| struct | S |
| | Optimized scale matrix. More...
|
| |
| struct | T |
| | Optimized translate matrix. More...
|
| |
| struct | T2 |
| | Optimized 2D translate matrix. More...
|
| |
|
| tt_force_inline | mat () noexcept |
| | Create an identity matrix.
|
| |
|
tt_force_inline | mat (mat const &rhs) noexcept=default |
| |
|
tt_force_inline mat & | operator= (mat const &rhs) noexcept=default |
| |
|
tt_force_inline | mat (mat &&rhs) noexcept=default |
| |
|
tt_force_inline mat & | operator= (mat &&rhs) noexcept=default |
| |
| tt_force_inline | mat (vec col0, vec col1, vec col2, vec col3=vec{0.0f, 0.0f, 0.0f, 1.0f}) noexcept |
| | Create a matrix for 4 vector-columns.
|
| |
| tt_force_inline | mat (float i00, float i10, float i20, float i30, float i01, float i11, float i21, float i31, float i02, float i12, float i22, float i32, float i03, float i13, float i23, float i33) |
| | Construct a matrix from the individual values.
|
| |
|
constexpr size_t | size () noexcept |
| |
|
template<size_t I> |
| tt_force_inline vec & | get () noexcept |
| |
|
template<size_t I> |
| tt_force_inline vec | get () const noexcept |
| |
| bool | is_z_rot90 () const noexcept |
| | Rotation around z axis is a multiple of 90 degree.
|
| |
|
| static mat | I () noexcept |
| | Create an identity matrix.
|
| |
|
static mat | RGBtoXYZ (float wx, float wy, float rx, float ry, float gx, float gy, float bx, float by) noexcept |
| |
| static mat | shear (float _00, float _01, float _10, float _11) noexcept |
| | Create a 2D shearing matrix.
|
| |
| template<int N = 2, typename T , std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> |
| static mat | R (T rhs) noexcept |
| | Create a rotation matrix.
|
| |
| static mat::T | align (aarect haystack, aarect needle, Alignment alignment) noexcept |
| | Align a rectangle within another rectangle.
|
| |
|
static mat | uniform2D_scale_and_translate (aarect haystack, aarect needle, Alignment alignment) noexcept |
| |
A 4x4 matrix.
You can use this to transform vec (which has 4 elements)
◆ mat() [1/3]
| tt_force_inline tt::mat::mat |
( |
| ) |
|
|
inlinenoexcept |
Create an identity matrix.
◆ mat() [2/3]
| tt_force_inline tt::mat::mat |
( |
vec | col0, |
|
|
vec | col1, |
|
|
vec | col2, |
|
|
vec | col3 = vec{0.0f, 0.0f, 0.0f, 1.0f} ) |
|
inlinenoexcept |
Create a matrix for 4 vector-columns.
◆ mat() [3/3]
| tt_force_inline tt::mat::mat |
( |
float | i00, |
|
|
float | i10, |
|
|
float | i20, |
|
|
float | i30, |
|
|
float | i01, |
|
|
float | i11, |
|
|
float | i21, |
|
|
float | i31, |
|
|
float | i02, |
|
|
float | i12, |
|
|
float | i22, |
|
|
float | i32, |
|
|
float | i03, |
|
|
float | i13, |
|
|
float | i23, |
|
|
float | i33 ) |
|
inline |
Construct a matrix from the individual values.
The arguments are ordered so that 4 rows of 4 values will construct the matrix visually in the same way as common mathamatics papers.
◆ align()
Align a rectangle within another rectangle.
- Parameters
-
| haystack | The outside rectangle |
| needle | The inside rectangle; to be aligned. |
| alignment | How the inside rectangle should be aligned. |
- Returns
- Translation matrix to move and align the needle in the haystack
◆ I()
| static mat tt::mat::I |
( |
| ) |
|
|
inlinestaticnoexcept |
Create an identity matrix.
◆ is_z_rot90()
| bool tt::mat::is_z_rot90 |
( |
| ) |
const |
|
inlinenoexcept |
Rotation around z axis is a multiple of 90 degree.
◆ R()
template<int N = 2, typename
T , std::enable_if_t< std::is_arithmetic_v<
T >, int > = 0>
| static mat tt::mat::R |
( |
T | rhs | ) |
|
|
inlinestaticnoexcept |
Create a rotation matrix.
- Parameters
-
| N | 0 = rotate around x-axis, 1=rotate around y-axis, 2=rotate around z-axis |
| rhs | Angle in radials counter-clockwise. |
◆ shear()
| static mat tt::mat::shear |
( |
float | _00, |
|
|
float | _01, |
|
|
float | _10, |
|
|
float | _11 ) |
|
inlinestaticnoexcept |
Create a 2D shearing matrix.
- Parameters
-
| _00 | row 0, col 0 |
| _01 | row 0, col 1 |
| _10 | row 1, col 0 |
| _11 | row 1, col 1 |
◆ operator* [1/6]
| tt_force_inline friend rect operator* |
( |
mat const & | lhs, |
|
|
aarect const & | rhs ) |
|
friend |
Matrix/aarect multiplication.
◆ operator* [2/6]
| mat operator* |
( |
mat const & | lhs, |
|
|
mat const & | rhs ) |
|
friend |
Matrix/Matrix multiplication.
◆ operator* [3/6]
| tt_force_inline friend rect operator* |
( |
mat const & | lhs, |
|
|
rect const & | rhs ) |
|
friend |
Matrix/rect multiplication.
◆ operator* [4/6]
| tt_force_inline friend vec operator* |
( |
mat const & | lhs, |
|
|
vec const & | rhs ) |
|
friend |
Matrix/Vector multiplication.
Used for transforming vectors.
◆ operator* [5/6]
| mat operator* |
( |
S const & | lhs, |
|
|
mat const & | rhs ) |
|
friend |
Scale/Matrix multiplication.
◆ operator* [6/6]
| mat operator* |
( |
T const & | lhs, |
|
|
mat const & | rhs ) |
|
friend |
Translate/Matrix multiplication.
◆ operator~
| mat operator~ |
( |
mat const & | rhs | ) |
|
|
friend |
◆ transpose
The documentation for this class was generated from the following file:
- hikogui/src/TTauri/Foundation/mat.hpp