Skip to main content

CorePlotting::SeriesLayout

CorePlotting::SeriesLayout

Complete layout specification for a single series. More…

#include <SeriesLayout.hpp>

Public Functions

Name
SeriesLayout() =default
Default constructor (identity transforms).
SeriesLayout(std::string id, LayoutTransform y_xform, int index =0)
Construct with series ID and Y transform.
SeriesLayout(std::string id, LayoutTransform y_xform, LayoutTransform x_xform, int index =0)
Construct with both transforms.
glm::mat4 computeModelMatrix() const
Compute Model matrix from transforms.
float transformY(float data_value) const
Apply Y transform to a data value.
float inverseTransformY(float world_y) const
Inverse Y transform (world Y → data value).

Public Attributes

Name
std::string series_id
Series identifier (e.g., key in DataManager).
LayoutTransform y_transform
Y-axis transform: data normalization + vertical positioning.
LayoutTransform x_transform
X-axis transform: usually identity for time-series.
int series_index
Index in the layout sequence (for ordering).

Detailed Description

struct CorePlotting::SeriesLayout;

Complete layout specification for a single series.

Contains the transforms that position and scale data in world space. The LayoutEngine computes these based on viewport and series configuration.

The y_transform combines:

  • Data normalization (z-score, peak-to-peak, etc.) - from NormalizationHelpers
  • Layout positioning (vertical stacking) - from LayoutEngine
  • User adjustments (manual gain/offset) - from widget config

For time-series plots, x_transform is typically identity since the TimeFrame handles X-axis mapping.

Public Functions Documentation

function SeriesLayout

SeriesLayout() =default

Default constructor (identity transforms).

function SeriesLayout

inline SeriesLayout(
    std::string id,
    LayoutTransform y_xform,
    int index =0
)

Construct with series ID and Y transform.

Parameters:

  • id Series identifier
  • y_xform Y-axis transform
  • index Index in layout sequence

function SeriesLayout

inline SeriesLayout(
    std::string id,
    LayoutTransform y_xform,
    LayoutTransform x_xform,
    int index =0
)

Construct with both transforms.

Parameters:

  • id Series identifier
  • y_xform Y-axis transform
  • x_xform X-axis transform
  • index Index in layout sequence

function computeModelMatrix

inline glm::mat4 computeModelMatrix() const

Compute Model matrix from transforms.

Combines X and Y transforms into a single 4x4 matrix. For time-series (x_transform is identity), this is just the Y transform.

function transformY

inline float transformY(
    float data_value
) const

Apply Y transform to a data value.

function inverseTransformY

inline float inverseTransformY(
    float world_y
) const

Inverse Y transform (world Y → data value).

Public Attributes Documentation

variable series_id

std::string series_id;

Series identifier (e.g., key in DataManager).

variable y_transform

LayoutTransform y_transform;

Y-axis transform: data normalization + vertical positioning.

variable x_transform

LayoutTransform x_transform;

X-axis transform: usually identity for time-series.

variable series_index

int series_index {0};

Index in the layout sequence (for ordering).


Updated on 2026-11-13 at 20:25:42 +0000