SPH
Public Member Functions | List of all members
SelectedParticlePlot Class Reference

Temporal plot of currently selected particle. More...

#include <Plots.h>

Inheritance diagram for SelectedParticlePlot:
IPlot Polymorphic

Public Member Functions

 SelectedParticlePlot (const Float initialPeriod)
 
 ~SelectedParticlePlot ()
 
void selectParticle (const Optional< Size > idx)
 
void setColorizer (const SharedPtr< IColorizer > &newColorizer)
 
virtual std::string getCaption () const override
 Returns the caption of the plot. More...
 
virtual void onTimeStep (const Storage &storage, const Statistics &stats) override
 Updates the plot with new data. More...
 
virtual void clear () override
 Clears all cached data, prepares for next run. More...
 
virtual void plot (IDrawingContext &dc) const override
 Draws the plot into the drawing context. More...
 
- Public Member Functions inherited from IPlot
Interval rangeX () const
 Returns the plotted range in x-coordinate. More...
 
Interval rangeY () const
 Returns the plotted range in y-coordinate. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Additional Inherited Members

- Protected Attributes inherited from IPlot
struct {
   Interval   x
 
   Interval   y
 
ranges
 

Detailed Description

Temporal plot of currently selected particle.

Uses current colorizer as a source quantity. If either colorizer or selected particle changes, plot is cleared. It also holds a cache of previously selected particles, so that if a previously plotted particle is re-selected, the cached data are redrawn.

Definition at line 26 of file Plots.h.

Constructor & Destructor Documentation

◆ SelectedParticlePlot()

SelectedParticlePlot::SelectedParticlePlot ( const Float  initialPeriod)
explicit

Definition at line 29 of file Plots.cpp.

◆ ~SelectedParticlePlot()

SelectedParticlePlot::~SelectedParticlePlot ( )
default

Member Function Documentation

◆ clear()

void SelectedParticlePlot::clear ( )
overridevirtual

Clears all cached data, prepares for next run.

Implements IPlot.

Definition at line 87 of file Plots.cpp.

◆ getCaption()

std::string SelectedParticlePlot::getCaption ( ) const
overridevirtual

Returns the caption of the plot.

Implements IPlot.

Definition at line 66 of file Plots.cpp.

◆ onTimeStep()

void SelectedParticlePlot::onTimeStep ( const Storage storage,
const Statistics stats 
)
overridevirtual

Updates the plot with new data.

Called every time step.

Implements IPlot.

Definition at line 74 of file Plots.cpp.

◆ plot()

void SelectedParticlePlot::plot ( IDrawingContext dc) const
overridevirtual

Draws the plot into the drawing context.

Implements IPlot.

Definition at line 103 of file Plots.cpp.

◆ selectParticle()

void SelectedParticlePlot::selectParticle ( const Optional< Size idx)

Definition at line 34 of file Plots.cpp.

◆ setColorizer()

void SelectedParticlePlot::setColorizer ( const SharedPtr< IColorizer > &  newColorizer)

Definition at line 58 of file Plots.cpp.


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