|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
NDC clip region for a draw, resolved to a pixel rect against a live framebuffer size wherever it is applied. More...
#include <Scissor.hpp>
Collaboration diagram for MayaFlux::Kinesis::Scissor:Public Member Functions | |
| bool | operator== (const Scissor &other) const noexcept |
Static Public Member Functions | |
| static Scissor | from (AABB2D ndc_bounds) noexcept |
| Construct directly from an NDC AABB2D. | |
| static Scissor | from (const AABB3D &world_bounds, const ViewTransform &view) noexcept |
| Project a world-space AABB3D through a ViewTransform and take the NDC bounding box of its projected corners. | |
| template<HasBounds T> | |
| static Scissor | from (const T &anchor) noexcept |
| Construct from anything exposing bounds(): Mapped<T>, Collapsible, Scrollable, Entry, EntryGroup, and so on. | |
Public Attributes | |
| AABB2D | bounds { .min = glm::vec2(-1.F), .max = glm::vec2(1.F) } |
NDC clip region for a draw, resolved to a pixel rect against a live framebuffer size wherever it is applied.
Not a rendering-backend type and not Forma-specific: it lives in Kinesis because anything with a spatial footprint can produce one. A 2D bounds region converts directly; anything exposing bounds() (Portal::Forma's Mapped<T>, Collapsible, Scrollable, Entry, EntryGroup, and so on) converts through the same HasBounds mechanism place() already uses; a 3D world-space AABB3D converts by projecting through a ViewTransform. Portal::Graphics::RenderConfig holds one as std::optional<Scissor>, and Buffers::RenderProcessor resolves it to a backend rect (Vulkan's vk::Rect2D) fresh every frame.
bounds are NDC (matches AABB2D convention: x/y in [-1,1], center origin, +Y up), so one Scissor stays correct across a resize; nothing here is resolved to pixels until the frame that draws it.
Definition at line 28 of file Scissor.hpp.