MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Portal::Forma::Plot::AxisRange Struct Reference

Scalar domain extent for one plot axis. More...

#include <AxisRange.hpp>

+ Collaboration diagram for MayaFlux::Portal::Forma::Plot::AxisRange:

Public Member Functions

AxisRangeauto_scale (bool enabled=true)
 Enable or disable auto-scaling.
 
float normalise (float v) const noexcept
 Map a value into [0, 1] within this range.
 
AxisRangerange (float lo, float hi)
 Set the explicit [min, max] domain.
 
AxisRangescale_if (std::function< bool()> predicate)
 Gate auto-scaling behind an arbitrary bool-returning callable.
 
float to_ndc (float v) const noexcept
 Map a value into [-1, 1] NDC within this range.
 

Public Attributes

bool auto_scaling { false }
 
float max { 1.F }
 
float min { -1.F }
 
std::function< bool()> scale_predicate
 When set, evaluated before applying a data-derived range.
 

Detailed Description

Scalar domain extent for one plot axis.

Maps raw double values in [min, max] to the normalised render space expected by the geometry function. When auto_scaling is true, min and max are recomputed from the series data on every process() call, subject to any predicate set via scale_if().

Fluent setters return AxisRange& for chained construction:

AxisRange{}.range(-1.F, 1.F)
AxisRange{}.range(0.F, 440.F).auto_scale(false)
AxisRange{}.scale_if([&active]{ return active.load(); })
AxisRange & range(float lo, float hi)
Set the explicit [min, max] domain.
Definition AxisRange.hpp:39
AxisRange & auto_scale(bool enabled=true)
Enable or disable auto-scaling.
Definition AxisRange.hpp:52
AxisRange & scale_if(std::function< bool()> predicate)
Gate auto-scaling behind an arbitrary bool-returning callable.
Definition AxisRange.hpp:76
Scalar domain extent for one plot axis.
Definition AxisRange.hpp:22

Definition at line 22 of file AxisRange.hpp.


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