Skip to main content

CorePlotting::ViewStateData

CorePlotting::ViewStateData

Serializable 2D camera state. More…

#include <ViewStateData.hpp>

Public Attributes

Name
double x_min
double x_max
double y_min
double y_max
double x_zoom
double y_zoom
double x_pan
double y_pan

Detailed Description

struct CorePlotting::ViewStateData;

Serializable 2D camera state.

All fields use double for serialization precision.

Data Bounds

[x_min](/api_generated/Classes/structCorePlotting_1_1ViewStateData.md#variable-x-min)/[x_max](/api_generated/Classes/structCorePlotting_1_1ViewStateData.md#variable-x-max) and [y_min](/api_generated/Classes/structCorePlotting_1_1ViewStateData.md#variable-y-min)/[y_max](/api_generated/Classes/structCorePlotting_1_1ViewStateData.md#variable-y-max) define the world-coordinate extent of the data being visualised. Changing these typically triggers a scene rebuild (e.g. re-gathering trial data for a different time window).

For widgets whose bounds come from a separate AxisState (ScatterPlot, ACF, TemporalProjection), bounds can be left at their defaults and set at render time.

View Transform

[x_zoom](/api_generated/Classes/structCorePlotting_1_1ViewStateData.md#variable-x-zoom)/[y_zoom](/api_generated/Classes/structCorePlotting_1_1ViewStateData.md#variable-y-zoom) scale the visible range (1.0 = fit-to-bounds). [x_pan](/api_generated/Classes/structCorePlotting_1_1ViewStateData.md#variable-x-pan)/[y_pan](/api_generated/Classes/structCorePlotting_1_1ViewStateData.md#variable-y-pan) shift the view in world coordinates. Changing these only requires a projection matrix update, not a scene rebuild.

Public Attributes Documentation

variable x_min

double x_min = -500.0;

variable x_max

double x_max = 500.0;

variable y_min

double y_min = 0.0;

variable y_max

double y_max = 100.0;

variable x_zoom

double x_zoom = 1.0;

variable y_zoom

double y_zoom = 1.0;

variable x_pan

double x_pan = 0.0;

variable y_pan

double y_pan = 0.0;

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