HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends
tt::geo::matrix< D > Class Template Reference

Public Member Functions

constexpr matrix (matrix const &) noexcept=default
 
constexpr matrix (matrix &&) noexcept=default
 
constexpr matrixoperator= (matrix const &) noexcept=default
 
constexpr matrixoperator= (matrix &&) noexcept=default
 
constexpr matrix (f32x4 col0, f32x4 col1, f32x4 col2, f32x4 col3=f32x4{0.0f, 0.0f, 0.0f, 1.0f}) noexcept
 
constexpr matrix (float c0r0, float c1r0, float c2r0, float c0r1, float c1r1, float c2r1, float c0r2, float c1r2, float c2r2) noexcept
 
constexpr matrix (float c0r0, float c1r0, float c2r0, float c3r0, float c0r1, float c1r1, float c2r1, float c3r1, float c0r2, float c1r2, float c2r2, float c3r2, float c0r3, float c1r3, float c2r3, float c3r3) noexcept
 
template<int E>
requires (E < D)
constexpr matrix (matrix< E > const &other) noexcept
 
template<int E>
requires (E < D)
constexpr matrixoperator= (matrix< E > const &rhs) noexcept
 
constexpr bool is_valid () const noexcept
 
constexpr auto operator* (f32x4 const &rhs) const noexcept
 
template<int E>
constexpr auto operator* (vector< E > const &rhs) const noexcept
 
template<int E>
constexpr auto operator* (extent< E > const &rhs) const noexcept
 
template<int E>
constexpr auto operator* (point< E > const &rhs) const noexcept
 
constexpr auto operator* (rect const &rhs) const noexcept
 
constexpr auto operator* (color const &rhs) const noexcept
 Transform a color by a color matrix.
 
constexpr auto operator* (matrix< 2 > const &rhs) const noexcept
 Matrix/Matrix multiplication.
 
constexpr auto operator* (matrix< 3 > const &rhs) const noexcept
 Matrix/Matrix multiplication.
 
template<int E>
constexpr bool operator== (matrix< E > const &rhs) const noexcept
 
constexpr matrix operator~ () const
 Invert matrix.
 

Static Public Member Functions

static constexpr matrix uniform (aarect src_rectangle, aarect dst_rectangle, alignment alignment) noexcept
 Create a transformation matrix to translate and uniformly-scale a src_rectangle to a dst_rectangle.
 

Friends

template<int I>
constexpr f32x4 get (matrix const &rhs) noexcept
 
constexpr matrix transpose (matrix rhs) noexcept
 Matrix transpose.
 

Member Function Documentation

◆ operator*() [1/3]

template<int D>
constexpr auto tt::geo::matrix< D >::operator* ( color const & rhs) const
inlineconstexprnoexcept

Transform a color by a color matrix.

The alpha value is not included in the transformation and copied from the input. The color will be correctly transformed if the color matrix includes translation.

◆ operator*() [2/3]

template<int D>
constexpr auto tt::geo::matrix< D >::operator* ( matrix< 2 > const & rhs) const
inlineconstexprnoexcept

Matrix/Matrix multiplication.

◆ operator*() [3/3]

template<int D>
constexpr auto tt::geo::matrix< D >::operator* ( matrix< 3 > const & rhs) const
inlineconstexprnoexcept

Matrix/Matrix multiplication.

◆ operator~()

template<int D>
constexpr matrix tt::geo::matrix< D >::operator~ ( ) const
inlineconstexpr

Invert matrix.

◆ uniform()

template<int D>
constexpr matrix< D > tt::geo::matrix< D >::uniform ( aarect src_rectangle,
aarect dst_rectangle,
alignment alignment )
staticconstexprnoexcept

Create a transformation matrix to translate and uniformly-scale a src_rectangle to a dst_rectangle.

The implementation is located in scale.hpp since the definition requires both scale and translate.

Parameters
src_rectangleThe rectangle to be transformed.
dst_rectangleThe rectangle after transformation.
alignmentHow the src_rectangle should be aligned inside the dst_rectangle after scaling and moving.
Returns
A transformation matrix to move and scale the src_rectangle to the dst_rectangle.

Friends And Related Symbol Documentation

◆ transpose

template<int D>
constexpr matrix transpose ( matrix< D > rhs)
friend

Matrix transpose.


The documentation for this class was generated from the following files: