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. More... | |
| virtual | ~ParticleGraph () |
| Destructor. More... | |
| void | set_particle_div (size_t particle_div) |
| Set particle divisor. More... | |
| void | set_qm_discretation (bool qm_discr) |
| Enable q/m discretation. More... | |
| virtual void | plot (cairo_t *cairo, const Coordmapper *cm, const double range[4]) |
| Plot graph with cairo. More... | |
| virtual void | plot_sample (cairo_t *cairo, double x, double y, double width, double height) |
| Plot sample for legend. More... | |
| virtual void | get_bbox (double bbox[4]) |
| Get bounding box of graph. More... | |
| void | add_color (const Color &color) |
| Add a color to the list of trajectory colors. More... | |
| void | clear_colors (void) |
| Clear the list of trajectory colors. More... | |
Public Member Functions inherited from Graph3D | |
| Graph3D () | |
| Constructor. More... | |
| virtual | ~Graph3D () |
| Virtual destructor. More... | |
| void | set_view (view_e view, int level) |
| Set the view of 3D drawable. More... | |
Public Member Functions inherited from Graph | |
| virtual | ~Graph () |
| Virtual destructor. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Graph3D | |
| view_e | _view |
| Geometry view direction. More... | |
| int | _vb [3] |
| Coordinate index for first, second and third axes. More... | |
| int | _level |
| Level of slice in mesh units. More... | |
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 |
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 |
Get bounding box of graph.
Returns the bounding box of the graph in array bbox in order xmin, ymin, xmax, ymax.
Implements Graph3D.
|
virtual |
|
virtual |
| 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.