29 std::shared_ptr<Simulation> simulation;
30 std::unordered_map<std::shared_ptr<Plot>, std::vector<std::pair<std::string, std::string>>> plots;
31 std::string windowSuffix;
35 explicit Visualization(
const std::shared_ptr<Simulation>& simulation);
43 void plot(
const std::vector<std::pair<std::string, std::string>>& data);
48 void plot(
const std::string& name,
const std::string& component);
62 void plot(
int plotId,
const std::vector<std::pair<std::string, std::string>>& data);
65 void plot(
int plotId,
const std::string& name,
const std::string& component);
79 [[nodiscard]] std::shared_ptr<Simulation>
getSimulation()
const {
return simulation; }
82 std::unordered_map<std::shared_ptr<Plot>, std::vector<std::pair<std::string, std::string>>>
getPlots() {
return plots; }
Manages a collection of plots driven by a running Simulation.
Definition visualization.h:27
void removeAllPlots()
Remove all registered plots.
Definition visualization.cpp:119
void render()
Render all plots (creates ImGui windows or child regions as appropriate).
Definition visualization.cpp:207
void setWindowIdSuffix(const std::string &s)
Set a suffix appended to all ImGui window IDs to avoid collisions.
Definition visualization.h:92
std::shared_ptr< Simulation > getSimulation() const
Return the underlying simulation.
Definition visualization.h:79
void removePlottingDataFromPlot(int plotId, const std::pair< std::string, std::string > &data)
Remove a specific data source from a plot.
Definition visualization.cpp:125
void removePlot(int plotId)
Remove the plot with the given plotId.
Definition visualization.cpp:99
void plot(PlotType type=PlotType::LINE_PLOT)
Add a blank plot of the given type.
Definition visualization.cpp:18
void renderTile(int plotId)
Render a single plot's content without creating an ImGui window (caller owns the region).
Definition visualization.cpp:178
std::unordered_map< std::shared_ptr< Plot >, std::vector< std::pair< std::string, std::string > > > getPlots()
Return the full plots map (plot → data sources).
Definition visualization.h:82
void clearWindowIdSuffix()
Definition visualization.h:93
Definition application.h:20
PlotType
Definition plot_parameters.h:37
Definition plot_parameters.h:48
Definition plot_parameters.h:62