Dynamic Neural Field Composer 0.0.0
A C++20 library and interactive application for building and simulating Dynamic Neural Field (DNF) architectures.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dnf_composer::Visualization Class Reference

Manages a collection of plots driven by a running Simulation. More...

#include <visualization.h>

Collaboration diagram for dnf_composer::Visualization:

Public Member Functions

void clearWindowIdSuffix ()
 
std::unordered_map< std::shared_ptr< Plot >, std::vector< std::pair< std::string, std::string > > > getPlots ()
 Return the full plots map (plot → data sources).
 
std::shared_ptr< SimulationgetSimulation () const
 Return the underlying simulation.
 
void plot (const PlotCommonParameters &parameters, const PlotSpecificParameters &specificParameters, const std::string &name, const std::string &component)
 Add a fully configured plot with a single data source.
 
void plot (const PlotCommonParameters &parameters, const PlotSpecificParameters &specificParameters, const std::vector< std::pair< std::string, std::string > > &data)
 Add a fully configured plot.
 
void plot (const std::string &name, const std::string &component)
 Add a new line plot with a single data source.
 
void plot (const std::vector< std::pair< std::string, std::string > > &data)
 Add a new line plot with the given (element, component) data sources.
 
void plot (int plotId, const std::string &name, const std::string &component)
 Add a single data source to an existing plot.
 
void plot (int plotId, const std::vector< std::pair< std::string, std::string > > &data)
 Add a data source to an existing plot identified by plotId.
 
void plot (PlotType type=PlotType::LINE_PLOT)
 Add a blank plot of the given type.
 
void removeAllPlots ()
 Remove all registered plots.
 
void removePlot (int plotId)
 Remove the plot with the given plotId.
 
void removePlottingDataFromPlot (int plotId, const std::pair< std::string, std::string > &data)
 Remove a specific data source from a plot.
 
void render ()
 Render all plots (creates ImGui windows or child regions as appropriate).
 
void renderTile (int plotId)
 Render a single plot's content without creating an ImGui window (caller owns the region).
 
void setWindowIdSuffix (const std::string &s)
 Set a suffix appended to all ImGui window IDs to avoid collisions.
 
 Visualization (const std::shared_ptr< Simulation > &simulation)
 Construct a Visualization backed by the given simulation.
 

Detailed Description

Manages a collection of plots driven by a running Simulation.

Visualization owns a set of Plot instances. Each plot is associated with one or more (element-name, component-name) data sources. On every call to render() the visualization pulls current data from the simulation and forwards it to each plot's renderer.

Constructor & Destructor Documentation

◆ Visualization()

dnf_composer::Visualization::Visualization ( const std::shared_ptr< Simulation > &  simulation)
explicit

Construct a Visualization backed by the given simulation.

Parameters
simulationThe simulation whose data will be visualized.

Member Function Documentation

◆ clearWindowIdSuffix()

void dnf_composer::Visualization::clearWindowIdSuffix ( )
inline

◆ getPlots()

std::unordered_map< std::shared_ptr< Plot >, std::vector< std::pair< std::string, std::string > > > dnf_composer::Visualization::getPlots ( )
inline

Return the full plots map (plot → data sources).

◆ getSimulation()

std::shared_ptr< Simulation > dnf_composer::Visualization::getSimulation ( ) const
inline

Return the underlying simulation.

◆ plot() [1/7]

void dnf_composer::Visualization::plot ( const PlotCommonParameters parameters,
const PlotSpecificParameters specificParameters,
const std::string &  name,
const std::string &  component 
)

Add a fully configured plot with a single data source.

Here is the call graph for this function:

◆ plot() [2/7]

void dnf_composer::Visualization::plot ( const PlotCommonParameters parameters,
const PlotSpecificParameters specificParameters,
const std::vector< std::pair< std::string, std::string > > &  data 
)

Add a fully configured plot.

Parameters
parametersCommon plot parameters (type, dimensions, annotations).
specificParametersType-specific parameters (e.g. LinePlotParameters).
dataList of {element-name, component-name} pairs.
Here is the call graph for this function:

◆ plot() [3/7]

void dnf_composer::Visualization::plot ( const std::string &  name,
const std::string &  component 
)

Add a new line plot with a single data source.

Parameters
nameElement unique name.
componentComponent name (e.g. "activation", "output").
Here is the call graph for this function:

◆ plot() [4/7]

void dnf_composer::Visualization::plot ( const std::vector< std::pair< std::string, std::string > > &  data)

Add a new line plot with the given (element, component) data sources.

Parameters
dataList of {element-name, component-name} pairs to plot.

◆ plot() [5/7]

void dnf_composer::Visualization::plot ( int  plotId,
const std::string &  name,
const std::string &  component 
)

Add a single data source to an existing plot.

Here is the call graph for this function:

◆ plot() [6/7]

void dnf_composer::Visualization::plot ( int  plotId,
const std::vector< std::pair< std::string, std::string > > &  data 
)

Add a data source to an existing plot identified by plotId.

Parameters
plotIdUnique plot identifier.
dataList of {element-name, component-name} pairs to add.
Here is the call graph for this function:

◆ plot() [7/7]

void dnf_composer::Visualization::plot ( PlotType  type = PlotType::LINE_PLOT)

Add a blank plot of the given type.

Parameters
typePlot type (default LINE_PLOT).
Here is the caller graph for this function:

◆ removeAllPlots()

void dnf_composer::Visualization::removeAllPlots ( )

Remove all registered plots.

◆ removePlot()

void dnf_composer::Visualization::removePlot ( int  plotId)

Remove the plot with the given plotId.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removePlottingDataFromPlot()

void dnf_composer::Visualization::removePlottingDataFromPlot ( int  plotId,
const std::pair< std::string, std::string > &  data 
)

Remove a specific data source from a plot.

Parameters
plotIdTarget plot.
dataThe {element-name, component-name} pair to remove.
Here is the call graph for this function:

◆ render()

void dnf_composer::Visualization::render ( )

Render all plots (creates ImGui windows or child regions as appropriate).

Here is the call graph for this function:

◆ renderTile()

void dnf_composer::Visualization::renderTile ( int  plotId)

Render a single plot's content without creating an ImGui window (caller owns the region).

Parameters
plotIdUnique plot identifier.
Here is the call graph for this function:

◆ setWindowIdSuffix()

void dnf_composer::Visualization::setWindowIdSuffix ( const std::string &  s)
inline

Set a suffix appended to all ImGui window IDs to avoid collisions.


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