HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends
v1::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 (vector3 col0, vector3 col1, vector3 col2) 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 holds_invariant () const noexcept
 
constexpr auto operator* (f32x4 const &rhs) const noexcept
 
constexpr float operator* (float const &rhs) const noexcept
 Transform a float by the scaling factor of the matrix.
 
constexpr corner_radii operator* (corner_radii const &rhs) const noexcept
 Transform a float by the scaling factor of the matrix.
 
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 rectangle operator* (aarectangle const &rhs) const noexcept
 
constexpr rectangle operator* (rectangle const &rhs) const noexcept
 
constexpr quad operator* (quad const &rhs) const noexcept
 
constexpr circle operator* (circle const &rhs) const noexcept
 
constexpr line_segment operator* (line_segment const &rhs) const noexcept
 
constexpr auto operator* (color const &rhs) const noexcept
 Transform a color by a color matrix.
 
constexpr auto operator* (matrix 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 (aarectangle src_rectangle, aarectangle 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/4]

template<int D>
constexpr auto v1::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/4]

template<int D>
constexpr corner_radii v1::geo::matrix< D >::operator* ( corner_radii const & rhs) const
inlineconstexprnoexcept

Transform a float by the scaling factor of the matrix.

The floating point number is transformed into a vector laying on the x-axis, then transformed, then extracting the hypot from it.

◆ operator*() [3/4]

template<int D>
constexpr float v1::geo::matrix< D >::operator* ( float const & rhs) const
inlineconstexprnoexcept

Transform a float by the scaling factor of the matrix.

The floating point number is transformed into a vector laying on the x-axis, then transformed, then extracting the hypot from it.

◆ operator*() [4/4]

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

Matrix/Matrix multiplication.

◆ operator~()

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

Invert matrix.

◆ uniform()

template<int D>
constexpr matrix< D > v1::geo::matrix< D >::uniform ( aarectangle src_rectangle,
aarectangle 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: