|
HikoGUI
A low latency retained GUI
|
#include <ttauri/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 |
| Construct a extent from a f32x4-numeric_array. | |
| constexpr | extent () noexcept |
| Construct a empty extent / zero length. | |
| constexpr | extent (float width, float height) noexcept |
| Construct a 2D extent from x and y elements. | |
| constexpr | extent (float width, float height, float depth=0.0f) noexcept |
| Construct a 3D extent from x, y and z elements. | |
| 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 bool | is_valid () const noexcept |
| Check if the extent is valid. | |
Friends | |
| constexpr friend extent | operator+ (extent const &lhs, extent const &rhs) noexcept |
| Add two extents from each other. | |
| constexpr friend extent | operator- (extent const &lhs, extent const &rhs) noexcept |
| Subtract two extents from each other. | |
| constexpr friend extent | operator* (extent const &lhs, float const &rhs) noexcept |
| Scale the extent by a scaler. | |
| constexpr friend extent | operator* (float const &lhs, extent const &rhs) noexcept |
| Scale the extent by a scaler. | |
| constexpr friend bool | operator== (extent const &lhs, extent const &rhs) noexcept |
| Compare if two extents are equal. | |
| constexpr friend float | squared_hypot (extent const &rhs) noexcept |
| Get the squared length of the extent. | |
| constexpr friend float | hypot (extent const &rhs) noexcept |
| Get the length of the extent. | |
| constexpr friend float | rcp_hypot (extent const &rhs) noexcept |
| Get the length of the extent. | |
| constexpr friend extent | normalize (extent const &rhs) noexcept |
| Normalize a extent to a unit extent. | |
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.
|
inlineexplicitconstexprnoexcept |
Construct a extent from a f32x4-numeric_array.
|
inlineconstexprnoexcept |
Construct a empty extent / zero length.
|
inlineconstexprnoexcept |
Construct a 2D extent from x and y elements.
| x | The x element. |
| y | The y element. |
|
inlineconstexprnoexcept |
Construct a 3D extent from x, y and z elements.
| x | The x element. |
| y | The y element. |
| z | The z 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.
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.
|
friend |
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 |
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. |
|
friend |
Get the length of the extent.
| rhs | The extent. |
|
friend |
Get the squared length of the extent.
| rhs | The extent. |