|
HikoGUI
A low latency retained GUI
|
#include <hikogui/geometry/extent3.hpp>
Public Types | |
| using | array_type = simd<float, 4> |
| using | value_type = array_type::value_type |
Public Member Functions | |
| constexpr | extent3 (extent3 const &) noexcept=default |
| constexpr | extent3 (extent3 &&) noexcept=default |
| constexpr extent3 & | operator= (extent3 const &) noexcept=default |
| constexpr extent3 & | operator= (extent3 &&) noexcept=default |
| constexpr | extent3 (extent2 const &other) noexcept |
| Construct a extent from a lower dimension extent. | |
| constexpr | operator extent2 () const noexcept |
| constexpr | operator array_type () const noexcept |
| Convert a extent to its array_type-nummeric_array. | |
| constexpr | extent3 (array_type const &other) noexcept |
| constexpr | operator bool () const noexcept |
| constexpr | operator vector3 () const noexcept |
| constexpr | extent3 () noexcept |
| Construct a empty extent / zero length. | |
| constexpr | extent3 (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 | width () const noexcept |
| Access the x-as-width element from the extent. | |
| constexpr float | height () const noexcept |
| Access the y-as-height element from the extent. | |
| constexpr float | depth () const noexcept |
| Access the z-as-depth element from the extent. | |
| constexpr vector3 | right () const noexcept |
| constexpr vector3 | up () const noexcept |
| constexpr extent3 & | operator+= (extent3 const &rhs) noexcept |
| constexpr bool | holds_invariant () const noexcept |
| Check if the extent is valid. | |
Static Public Member Functions | |
| static constexpr extent3 | infinity () noexcept |
| static constexpr extent3 | large () noexcept |
| static constexpr extent3 | 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.
Construct a extent from a lower dimension extent.
|
inlineconstexprnoexcept |
Construct a empty extent / zero length.
|
inlineconstexprnoexcept |
Construct a 3D extent from width, height and depth.
| width | The width element. |
| height | The height element. |
| depth | The depth element. |
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.
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.
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.
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.
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 array_type-nummeric_array.
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.
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. |
Scale the extent by a scaler.
| lhs | The extent to scale. |
| rhs | The scaling factor. |
Scale the extent by a scaler.
| lhs | The extent to scale. |
| rhs | The scaling factor. |
Add two extents from each other.
| lhs | The first extent. |
| rhs | The second extent. |
Add a scaler to the extent.
| lhs | The extent to scale. |
| rhs | The scaling factor. |
Subtract two extents from each other.
| lhs | The first extent. |
| rhs | The second extent. |
Compare if two extents are equal.
| lhs | The first extent. |
| rhs | The second extent. |
Get the length of the extent.
| rhs | The extent. |
Get the squared length of the extent.
| rhs | The extent. |