Class for drawing particle trajectories. More...
#include <particlegraph.hpp>
Public Member Functions | |
| ParticleGraph (const Geometry &g, const ParticleDataBase &pdb, uint32_t particle_div=11, uint32_t particle_offset=0, bool qm_discr=true) | |
| Constructor for particle plotter. More... | |
| virtual | ~ParticleGraph () |
| Destructor. More... | |
| void | set_particle_div (uint32_t particle_div, uint32_t particle_offset) |
| Set particle divisor and offset. 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 Vec3D &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 (const Mesh &mesh) | |
| 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 | |
| const Mesh & | _mesh |
| Mesh of simulation. More... | |
| 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... | |
| double | _level_si |
| Level in meters. More... | |
Detailed Description
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.
Constructor & Destructor Documentation
◆ ParticleGraph()
| ParticleGraph::ParticleGraph | ( | const Geometry & | g, |
| const ParticleDataBase & | pdb, | ||
| uint32_t | particle_div = 11, |
||
| uint32_t | particle_offset = 0, |
||
| bool | qm_discr = true |
||
| ) |
Constructor for particle plotter.
◆ ~ParticleGraph()
|
virtual |
Destructor.
Member Function Documentation
◆ add_color()
| void ParticleGraph::add_color | ( | const Vec3D & | color | ) |
Add a color to the list of trajectory colors.
◆ clear_colors()
| void ParticleGraph::clear_colors | ( | void | ) |
Clear the list of trajectory colors.
◆ get_bbox()
|
virtual |
Get bounding box of graph.
Returns the bounding box of the graph in array bbox in order xmin, ymin, xmax, ymax.
Implements Graph3D.
◆ plot()
|
virtual |
◆ plot_sample()
|
virtual |
◆ set_particle_div()
| void ParticleGraph::set_particle_div | ( | uint32_t | particle_div, |
| uint32_t | particle_offset | ||
| ) |
Set particle divisor and offset.
Set particle_div to zero for no plotting, one for plotting every particle, two for plotting every second particle, three for plotting every third particle, etc. Defaults to
- Plotter skips the first particle_offset particles.
◆ set_qm_discretation()
| 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.
The documentation for this class was generated from the following files:
Public Member Functions inherited from