|
HikoGUI
A low latency retained GUI
|
#include <ttauri/ivec.hpp>
Public Member Functions | |
| i32x4 (i32x4 const &rhs)=default | |
| i32x4 & | operator= (i32x4 const &rhs)=default |
| i32x4 (i32x4 &&rhs)=default | |
| i32x4 & | operator= (i32x4 &&rhs)=default |
| i32x4 (__m128i rhs) noexcept | |
| Create a i32x4 out of a __m128i. | |
| i32x4 & | operator= (__m128i rhs) noexcept |
| Create a i32x4 out of a __m128i. | |
| operator __m128i () const noexcept | |
| Convert a i32x4 to a __m128i. | |
| i32x4 (f32x4 const &rhs) noexcept | |
| i32x4 & | operator= (f32x4 const &rhs) noexcept |
| operator f32x4 () const noexcept | |
| operator std::array< int32_t, 4 > () const noexcept | |
| template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> | |
| i32x4 (T rhs) noexcept | |
| Initialize a i32x4 with all elements set to a value. | |
| template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> | |
| i32x4 & | operator= (T rhs) noexcept |
| Initialize a i32x4 with all elements set to a value. | |
| template<typename T , typename U , typename V = int, typename W = int, std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U > &&std::is_arithmetic_v< V > &&std::is_arithmetic_v< W >, int > = 0> | |
| i32x4 (T x, U y, V z=0, W w=0) noexcept | |
| Create a i32x4 out of 2 to 4 values. | |
| template<size_t I, typename T , std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> | |
| i32x4 & | set (T rhs) noexcept |
| template<size_t I> | |
| int | get () const noexcept |
| constexpr size_t | size () const noexcept |
| template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> | |
| i32x4 & | x (T rhs) noexcept |
| template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> | |
| i32x4 & | y (T rhs) noexcept |
| template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> | |
| i32x4 & | z (T rhs) noexcept |
| template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, int > = 0> | |
| i32x4 & | w (T rhs) noexcept |
| int | x () const noexcept |
| int | y () const noexcept |
| int | z () const noexcept |
| int | w () const noexcept |
| int | width () const noexcept |
| int | height () const noexcept |
| i32x4 & | operator+= (i32x4 const &rhs) noexcept |
| i32x4 & | operator-= (i32x4 const &rhs) noexcept |
| i32x4 & | operator*= (i32x4 const &rhs) noexcept |
| template<char a, char b, char c, char d> | |
| i32x4 | swizzle () const noexcept |
Static Public Member Functions | |
| template<typename T , typename U , typename V = int, typename W = int, std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U > &&std::is_arithmetic_v< V > &&std::is_arithmetic_v< W >, int > = 0> | |
| static i32x4 | point (T x, U y, V z=0, W w=1) noexcept |
| Create a i32x4 out of 2 to 4 values. | |
| template<char a, char b, char c, char d> | |
| static constexpr int | swizzle_permute_mask () noexcept |
Friends | |
| i32x4 | operator+ (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| i32x4 | operator- (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| i32x4 | operator* (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| i32x4 | max (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| i32x4 | min (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| bool | operator== (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| bool | operator!= (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| int | eq (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| Equal to. | |
| int | operator< (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| Less than. | |
| int | operator> (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| Greater than. | |
| int | operator<= (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| int | operator>= (i32x4 const &lhs, i32x4 const &rhs) noexcept |
| std::string | to_string (i32x4 const &rhs) noexcept |
| std::ostream friend & | operator<< (std::ostream &lhs, i32x4 const &rhs) noexcept |
| template<std::size_t I> | |
| int | get (i32x4 const &rhs) noexcept |
A 4D vector.
If you need a 3D vector or point, you can use this vector class as a homogenious coordinate.
This class supports swizzeling. Swizzeling is done using member functions which will return a vec. The name of the member function consists of 2 to 4 of the following characters: 'x', 'y', 'z', 'w', 'r', 'g', 'b', 'a', '0' & '1'. If the swizzle member function name would start with a '0' or '1' character it will be prefixed with an underscore '_'.
Since swizzle member functions always return a 4D f32x4, the third and forth element will default to '0' and 'w'. This allows a 2D vector to maintain its homogeniousness.
|
inlinenoexcept |
Create a i32x4 out of a __m128i.
|
inlineexplicitnoexcept |
Initialize a i32x4 with all elements set to a value.
Useful as a scalar converter, when combined with an arithmetic operator.
|
inlinenoexcept |
Create a i32x4 out of 2 to 4 values.
This vector is used as a homogeneous coordinate, meaning:
|
inlinenoexcept |
Convert a i32x4 to a __m128i.
|
inlinenoexcept |
Initialize a i32x4 with all elements set to a value.
Useful as a scalar converter, when combined with an arithmetic operator.
|
inlinestaticnoexcept |
Create a i32x4 out of 2 to 4 values.
This vector is used as a homogeneous coordinate, meaning:
Equal to.
Less than.
Greater than.