|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Reactive Y-position accumulator for vertical primitive stacking. More...
#include <LayoutCursor.hpp>
Collaboration diagram for MayaFlux::Portal::Forma::LayoutCursor:Public Member Functions | |
| Kinesis::AABB2D | advance (float height) |
Advance the cursor downward by height and return the NDC AABB occupied by the primitive just placed. | |
| LayoutCursor () | |
| LayoutCursor (float y_start) | |
| void | reset (float y_start=1.F) |
Reset to y_start. | |
| void | skip (float height) |
| Advance without returning bounds. | |
| std::shared_ptr< MappedState< float > > | state () const |
| Shared baseline state. | |
| float | y () const |
Private Attributes | |
| std::shared_ptr< MappedState< float > > | m_state |
Reactive Y-position accumulator for vertical primitive stacking.
Holds a shared MappedState<float> carrying the current NDC Y baseline. Any primitive whose GeometryFn closes over the state pointer will reflow automatically when the cursor advances, via the normal version-bump path.
NDC Y runs +1 (top) to -1 (bottom). advance() subtracts height.
Default construction places the cursor at the top of the screen (y=1). This matches the most common starting position and allows LayoutCursor to be a plain member of structs that use aggregate or value initialization.
Definition at line 20 of file LayoutCursor.hpp.