#include <GREM/core/extents.hpp>
|
| constexpr | operator Offset< 3 > () const noexcept |
| | Convert this offset to a 3D offset.
|
| constexpr | operator vec2 () const noexcept |
| | Convert this offset to a floating-point 2D vector.
|
| constexpr | operator dvec2 () const noexcept |
| | Convert this offset to a double-precision floating-point 2D vector.
|
| constexpr | operator ivec2 () const noexcept |
| | Convert this offset to an integer 2D vector.
|
| constexpr | operator u32vec2 () const noexcept |
| | Convert this offset to an unsigned integer 2D vector.
|
| constexpr bool | operator== (const Offset< 2 > &other) const =default |
| | Compare this offset to another for equality.
|
|
| static constexpr Offset< 2 > | from (i32vec2 v) noexcept |
| | Create an offset from a vector of integers.
|
| static Offset< 2 > | round (vec2 v) |
| | Create an offset from a vector of floating-point numbers, rounded to their nearest integer values before conversion.
|
| static Offset< 2 > | floor (vec2 v) |
| | Create an offset from a vector of floating-point numbers, rounded down to their floor integer values before conversion.
|
| static Offset< 2 > | ceil (vec2 v) |
| | Create an offset from a vector of floating-point numbers, rounded up to their ceiling integer values before conversion.
|
| static Offset< 2 > | trunc (vec2 v) |
| | Create an offset from a vector of floating-point numbers, rounded to their truncated integer values before conversion.
|
|
| int32_t | x |
| | Horizontal offset.
|
| int32_t | y |
| | Vertical offset.
|
◆ from()
|
|
inlinestaticnodiscardconstexprnoexcept |
Create an offset from a vector of integers.
- Parameters
-
- Returns
- the corresponding offset.
◆ round()
Create an offset from a vector of floating-point numbers, rounded to their nearest integer values before conversion.
- Parameters
-
- Returns
- the rounded offset.
◆ floor()
Create an offset from a vector of floating-point numbers, rounded down to their floor integer values before conversion.
- Parameters
-
- Returns
- the floor-rounded offset.
◆ ceil()
Create an offset from a vector of floating-point numbers, rounded up to their ceiling integer values before conversion.
- Parameters
-
- Returns
- the ceiling-rounded offset.
◆ trunc()
Create an offset from a vector of floating-point numbers, rounded to their truncated integer values before conversion.
- Parameters
-
- Returns
- the truncated offset.
◆ operator Offset< 3 >()
Convert this offset to a 3D offset.
- Returns
- the equivalent 3D offset, with a depth offset of 0.
◆ operator vec2()
Convert this offset to a floating-point 2D vector.
- Returns
- a 2D vector representing the offset.
◆ operator dvec2()
Convert this offset to a double-precision floating-point 2D vector.
- Returns
- a 2D vector representing the offset.
◆ operator ivec2()
Convert this offset to an integer 2D vector.
- Returns
- a 2D vector representing the offset.
◆ operator u32vec2()
Convert this offset to an unsigned integer 2D vector.
- Returns
- a 2D vector representing the offset.
◆ operator==()
|
|
nodiscardconstexprdefault |
Compare this offset to another for equality.
- Parameters
-
| other | the offset to compare this one to. |
- Returns
- true if the offsets are equal, false otherwise.
The documentation for this struct was generated from the following file: