MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Portal::Forma::LayoutCursor Class Reference

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, scoped to the cursor's column extents.
 
 LayoutCursor ()
 
 LayoutCursor (float y_start, float x_min=-1.F, float x_max=1.F)
 Construct a cursor at y_start scoped to a horizontal column.
 
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.
 
void sync_to (LayoutCursor &other)
 Reset both cursors to the lower of their two current Y values.
 
float x_max () const noexcept
 
float x_min () const noexcept
 
float y () const
 

Private Attributes

std::shared_ptr< MappedState< float > > m_state
 
float m_x_max { 1.F }
 
float m_x_min { -1.F }
 

Detailed Description

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.


The documentation for this class was generated from the following file: