|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Axis-aligned bounding rectangle in a 2D coordinate space. More...
#include <Bounds.hpp>
Collaboration diagram for MayaFlux::Kinesis::AABB2D:Public Member Functions | |
| glm::vec2 | center () const noexcept |
| bool | contains (glm::vec2 p) const noexcept |
| AABB2D | expanded (float margin) const noexcept |
| float | height () const noexcept |
| bool | overlaps (const AABB2D &other) const noexcept |
| AABB2D | translated (glm::vec2 offset) const noexcept |
| float | width () const noexcept |
Static Public Member Functions | |
| static AABB2D | from_buffer_transform (glm::vec2 ndc_position, glm::vec2 ndc_scale) noexcept |
| Construct from a TextureBuffer NDC position and scale. | |
| static AABB2D | from_ndc (glm::vec2 center, glm::vec2 half) noexcept |
| static AABB2D | from_pixel (float x, float y, float w, float h, uint32_t win_w, uint32_t win_h) noexcept |
| Construct from pixel-space top-left rect, converted to NDC. | |
Public Attributes | |
| glm::vec2 | max |
| glm::vec2 | min |
Axis-aligned bounding rectangle in a 2D coordinate space.
Used as a fast-reject hint in Portal::Forma::Element. All coordinates are in NDC by convention when used in Forma: x and y in [-1, +1], center origin, +Y up, matching ViewTransform.hpp and Windowing.hpp.
Named constructors convert from other coordinate spaces into NDC.
Definition at line 21 of file Bounds.hpp.