|
HikoGUI
A low latency retained GUI
|
#include <hikogui/geometry/extent.hpp>
Public Member Functions | |
| constexpr | extent (extent const &) noexcept=default |
| constexpr | extent (extent &&) noexcept=default |
| constexpr extent & | operator= (extent const &) noexcept=default |
| constexpr extent & | operator= (extent &&) noexcept=default |
| template<int E> requires (E < D) | |
| constexpr | extent (extent< E > const &other) noexcept |
| Construct a extent from a lower dimension extent. | |
| constexpr | operator f32x4 () const noexcept |
| Convert a extent to its f32x4-nummeric_array. | |
| constexpr | extent (f32x4 const &other) noexcept |
| constexpr | operator bool () const noexcept |
|
template<int E> requires (E >= D) | |
| constexpr | operator vector< E > () const noexcept |
| constexpr | extent () noexcept |
| Construct a empty extent / zero length. | |
| constexpr | extent (float width, float height) noexcept |
| Construct a 2D extent from the width and height. | |
| constexpr | extent (float width, float height, float depth=0.0f) noexcept |
| Construct a 3D extent from width, height and depth. | |
| constexpr float & | width () noexcept |
| Access the x-as-width element from the extent. | |
| constexpr float & | height () noexcept |
| Access the y-as-height element from the extent. | |
| constexpr float & | depth () noexcept |
| Access the z-as-depth element from the extent. | |
| constexpr float const & | width () const noexcept |
| Access the x-as-width element from the extent. | |
| constexpr float const & | height () const noexcept |
| Access the y-as-height element from the extent. | |
| constexpr float const & | depth () const noexcept |
| Access the z-as-depth element from the extent. | |
| constexpr vector< D > | right () const noexcept |
| constexpr vector< D > | up () const noexcept |
| constexpr extent & | operator+= (extent const &rhs) noexcept |
| constexpr bool | holds_invariant () const noexcept |
| Check if the extent is valid. | |
Static Public Member Functions | |
| static constexpr extent | infinity () noexcept |
| static constexpr extent | infinity () noexcept |
| static constexpr extent | large () noexcept |
| static constexpr extent | large () noexcept |
| static constexpr extent | nan () noexcept |
| static constexpr extent | nan () noexcept |
A high-level geometric extent.
A extent, for both 2D or 3D is internally represented as a 4D homogeneous extent. Which can be efficiently implemented as a __m128 SSE register.
|
inlineconstexprnoexcept |
Construct a extent from a lower dimension extent.
|
inlineconstexprnoexcept |
Construct a empty extent / zero length.
|
inlineconstexprnoexcept |
Construct a 2D extent from the width and height.
| width | The width element. |
| height | The height element. |
|
inlineconstexprnoexcept |
Construct a 3D extent from width, height and depth.
| width | The width element. |
| height | The height element. |
| depth | The depth element. |
|
inlineconstexprnoexcept |
Access the z-as-depth element from the extent.
A extent can be seen as having a width, height and depth, these accessors are aliases for x, y, and z.
|
inlineconstexprnoexcept |
Access the z-as-depth element from the extent.
A extent can be seen as having a width, height and depth, these accessors are aliases for x, y, and z.
|
inlineconstexprnoexcept |
Access the y-as-height element from the extent.
A extent can be seen as having a width, height and depth, these accessors are aliases for x, y, and z.
|
inlineconstexprnoexcept |
Access the y-as-height element from the extent.
A extent can be seen as having a width, height and depth, these accessors are aliases for x, y, and z.
|
inlineconstexprnoexcept |
Check if the extent is valid.
Extends must be positive. This function will check if w is zero, and with 2D extent is z is zero.
|
inlineexplicitconstexprnoexcept |
Convert a extent to its f32x4-nummeric_array.
|
inlineconstexprnoexcept |
Access the x-as-width element from the extent.
A extent can be seen as having a width, height and depth, these accessors are aliases for x, y, and z.
|
inlineconstexprnoexcept |
Access the x-as-width element from the extent.
A extent can be seen as having a width, height and depth, these accessors are aliases for x, y, and z.
Get the length of the extent.
| rhs | The extent. |
Normalize a extent to a unit extent.
| rhs | The extent. |
|
friend |
Scale the extent by a scaler.
| lhs | The extent to scale. |
| rhs | The scaling factor. |
|
friend |
Scale the extent by a scaler.
| lhs | The extent to scale. |
| rhs | The scaling factor. |
|
friend |
Add two extents from each other.
| lhs | The first extent. |
| rhs | The second extent. |
|
friend |
Add a scaler to the extent.
| lhs | The extent to scale. |
| rhs | The scaling factor. |
|
friend |
Subtract two extents from each other.
| lhs | The first extent. |
| rhs | The second extent. |
|
friend |
Compare if two extents are equal.
| lhs | The first extent. |
| rhs | The second extent. |
Get the length of the extent.
| rhs | The extent. |
|
friend |
Get the squared length of the extent.
| rhs | The extent. |