#include <GREM/core/extents.hpp>
|
| constexpr | operator Offset< 3 > () const noexcept |
| | Convert this extent to an offset.
|
| constexpr | operator vec3 () const noexcept |
| | Convert this extent to a floating-point 3D vector.
|
| constexpr | operator dvec3 () const noexcept |
| | Convert this extent to a double-precision floating-point 3D vector.
|
| constexpr | operator ivec3 () const noexcept |
| | Convert this extent to an integer 3D vector.
|
| constexpr | operator u32vec3 () const noexcept |
| | Convert this extent to an unsigned integer 3D vector.
|
| constexpr bool | operator== (const Extent< 3 > &other) const =default |
| | Compare this extent to another for equality.
|
| uint32_t | fitIntegerScaled (Extent targetSize) |
| | Fit the extents into a target size at the largest positive integer scale of its original size that still fits within the target.
|
|
| static constexpr Extent< 3 > | from (u32vec3 v) noexcept |
| | Create an extent from a vector of integers.
|
| static Extent< 3 > | round (vec3 v) |
| | Create an extent from a vector of floating-point numbers, rounded to their nearest integer values before conversion.
|
| static Extent< 3 > | floor (vec3 v) |
| | Create an extent from a vector of floating-point numbers, rounded down to their floor integer values before conversion.
|
| static Extent< 3 > | ceil (vec3 v) |
| | Create an extent from a vector of floating-point numbers, rounded up to their ceiling integer values before conversion.
|
| static Extent< 3 > | trunc (vec3 v) |
| | Create an extent from a vector of floating-point numbers, rounded to their truncated integer values before conversion.
|
|
| uint32_t | width |
| | Horizontal extent.
|
| uint32_t | height = width |
| | Vertical extent.
|
| uint32_t | depth = 1 |
| | Number of layers.
|
◆ from()
|
|
inlinestaticnodiscardconstexprnoexcept |
Create an extent from a vector of integers.
- Parameters
-
- Returns
- the corresponding extent.
◆ round()
Create an extent from a vector of floating-point numbers, rounded to their nearest integer values before conversion.
- Parameters
-
- Returns
- the rounded extent.
◆ floor()
Create an extent from a vector of floating-point numbers, rounded down to their floor integer values before conversion.
- Parameters
-
- Returns
- the floor-rounded extent.
◆ ceil()
Create an extent from a vector of floating-point numbers, rounded up to their ceiling integer values before conversion.
- Parameters
-
- Returns
- the ceiling-rounded extent.
◆ trunc()
Create an extent from a vector of floating-point numbers, rounded to their truncated integer values before conversion.
- Parameters
-
- Returns
- the truncated extent.
◆ operator Offset< 3 >()
|
|
inlineexplicitconstexprnoexcept |
Convert this extent to an offset.
- Returns
- an offset with the width, height and depth of the extent as its x, y and z components, respectively.
◆ operator vec3()
Convert this extent to a floating-point 3D vector.
- Returns
- a 3D vector holding the width, height and depth of the extent in its x, y and z components, respectively.
◆ operator dvec3()
Convert this extent to a double-precision floating-point 3D vector.
- Returns
- a 3D vector holding the width, height and depth of the extent in its x, y and z components, respectively.
◆ operator ivec3()
Convert this extent to an integer 3D vector.
- Returns
- a 3D vector holding the width, height and depth of the extent in its x, y and z components, respectively.
◆ operator u32vec3()
Convert this extent to an unsigned integer 3D vector.
- Returns
- a 3D vector holding the width, height and depth of the extent in its x, y and z components, respectively.
◆ operator==()
|
|
nodiscardconstexprdefault |
Compare this extent to another for equality.
- Parameters
-
| other | the extent to compare this one to. |
- Returns
- true if the extents are equal, false otherwise.
◆ fitIntegerScaled()
Fit the extents into a target size at the largest positive integer scale of its original size that still fits within the target.
- Parameters
-
| targetSize | target size to fit the extents into. |
- Returns
- the integer scale that was chosen.
- Note
- If the original size cannot fit within the target, then the chosen scale will be 1.
◆ width
◆ height
◆ depth
The documentation for this struct was generated from the following file: