urect
| Type | Struct |
| Namespace | conjure::math |
| Include File Path | engine/include/conjure/core/math/rect.h |
| Source File Path | N/A |
| API ↗ | Math |
Syntax
Variables
| Access | Name | Type | Default | Description |
|---|---|---|---|---|
| public | height | u32 | 0 | |
| public | width | u32 | 0 | |
| public | x | u32 | 0 | |
| public | y | u32 | 0 |
Functions
Public
bottom
bottom[[nodiscard]] u32 bottom() const noexcept;One past the last covered row. Asserts when y + height overflows u32.
contains
containsTrue when the pixel at (pixelX, pixelY) is covered.
[[nodiscard]] bool contains(
const urect &other) const noexcept;True when every pixel of other is covered by this rectangle (an empty other is contained when its origin is inside or on the edge).
intersection
intersectionThe pixels covered by both rectangles; empty (zero size at the clamped origin) when they do not intersect.
intersects
intersects[[nodiscard]] bool intersects(
const urect &other) const noexcept;True when both rectangles cover at least one common pixel.
is_empty
is_empty[[nodiscard]] bool is_empty() const noexcept;True when the rectangle covers no pixel.
right
right[[nodiscard]] u32 right() const noexcept;One past the last covered column. Asserts when x + width overflows u32.
to_rect
to_rect[[nodiscard]] rect to_rect() const noexcept;The same region as a float rectangle (min = origin, max = origin + size).