IBSimu 1.0.4
|
Class for drawing particle trajectories. More...
#include <particlegraph.hpp>
Public Member Functions | |
ParticleGraph (const Geometry &g, const ParticleDataBase &pdb, int particlediv=10, bool qm_discr=true) | |
Constructor for particle plotter. | |
virtual | ~ParticleGraph () |
Destructor. | |
void | set_particle_div (size_t particle_div) |
Set particle divisor. | |
void | set_qm_discretation (bool qm_discr) |
Enable q/m discretation. | |
virtual void | plot (cairo_t *cairo, const Coordmapper *cm, const double range[4]) |
Plot graph with cairo. | |
virtual void | get_bbox (double bbox[4]) |
Get bounding box of graph. | |
void | add_color (const Color &color) |
Add a color to the list of trajectory colors. | |
void | clear_colors (void) |
Clear the list of trajectory colors. |
Class for drawing particle trajectories.
Draws particle trajectories. Using the particlediv variable only one per particlediv trajectories is plotted. The different q/m values are discriminated by colors if enabled with qm_dircr. The trajectories are drawn with straight lines if the particle database interpolation is set to linear or curves if polynomial interpolation is used.
Implementation of Graph3D.
ParticleGraph::ParticleGraph | ( | const Geometry & | g, |
const ParticleDataBase & | pdb, | ||
int | particlediv = 10 , |
||
bool | qm_discr = true |
||
) |
Constructor for particle plotter.
virtual ParticleGraph::~ParticleGraph | ( | ) | [virtual] |
Destructor.
void ParticleGraph::add_color | ( | const Color & | color | ) |
Add a color to the list of trajectory colors.
void ParticleGraph::clear_colors | ( | void | ) |
Clear the list of trajectory colors.
virtual void ParticleGraph::get_bbox | ( | double | bbox[4] | ) | [virtual] |
Get bounding box of graph.
Returns the bounding box of the graph in array bbox in order xmin, ymin, xmax, ymax.
Implements Graph3D.
virtual void ParticleGraph::plot | ( | cairo_t * | cairo, |
const Coordmapper * | cm, | ||
const double | range[4] | ||
) | [virtual] |
Plot graph with cairo.
Plot the graph using cairo and coordinate mapper cm. The visible range of plot is given in array range in order xmin, ymin, xmax, ymax.
Implements Graph3D.
void ParticleGraph::set_particle_div | ( | size_t | particle_div | ) |
Set particle divisor.
Zero for no plotting, one for plotting every particle, two for plotting every second particle, three for plotting every third particle, etc. Defaults to 10.
void ParticleGraph::set_qm_discretation | ( | bool | qm_discr | ) |
Enable q/m discretation.
If q/m discretation is enabled, different q/m particles will be plotted with different colors. Default is enabled.