Abstract base class for geometry slice plots. More...
#include <graph3d.hpp>

Public Member Functions | |
Graph3D (const Mesh &mesh) | |
Constructor. More... | |
virtual | ~Graph3D () |
Virtual destructor. More... | |
virtual void | plot (cairo_t *cairo, const Coordmapper *cm, const double range[4])=0 |
Plot graph with cairo. More... | |
virtual void | plot_sample (cairo_t *cairo, double x, double y, double width, double height)=0 |
Plot sample for legend. More... | |
virtual void | get_bbox (double bbox[4])=0 |
Get bounding box of drawable. More... | |
void | set_view (view_e view, int level) |
Set the view of 3D drawable. More... | |
![]() | |
virtual | ~Graph () |
Virtual destructor. More... | |
Protected Attributes | |
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
Abstract base class for geometry slice plots.
Implementation of Graph. Used in Frame type plots.
Provides functionality to select a slice of geometry along axes at any mesh level in any direction. The direction is selected with view and level in integer (mesh count) level. Provides the child class with permutated coordinate indexes. The first coordinate (index vb[0]) will be used for the horizontal axis of the plot, the second coordinate (index vb[1]) for the vertical axis and the third coordinate (index vb[2]) for the level. In three dimensions all the views are possible. In two dimensions, only VIEW_XY and VIEW_YX are possible. Here there is no separate redial index, Y is used instead.
Constructor & Destructor Documentation
◆ Graph3D()
|
inline |
Constructor.
Constructor for 3D graph in a simulation volume defined by mesh.
◆ ~Graph3D()
|
inlinevirtual |
Virtual destructor.
Member Function Documentation
◆ get_bbox()
|
pure virtual |
Get bounding box of drawable.
Returns the bounding box of the drawable in array bbox in order xmin, ymin, xmax, ymax.
Implements Graph.
Implemented in SolidGraph, ParticleGraph, MeshGraph, FieldGraph, and EqPotGraph.
◆ plot()
|
pure 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. The graph should be able to handle any range values. Also min > max.
Called by Frame during drawing.
Implements Graph.
Implemented in SolidGraph, ParticleGraph, MeshGraph, FieldGraph, and EqPotGraph.
◆ plot_sample()
|
pure virtual |
Plot sample for legend.
Plot graph sample for legend at cairo coordinates (x,y).
Implements Graph.
Implemented in SolidGraph, ParticleGraph, MeshGraph, FieldGraph, and EqPotGraph.
◆ set_view()
|
inline |
Set the view of 3D drawable.
Sets view direction to view and the view level to level.
Member Data Documentation
◆ _level
|
protected |
Level of slice in mesh units.
◆ _level_si
|
protected |
Level in meters.
◆ _mesh
◆ _vb
|
protected |
Coordinate index for first, second and third axes.
◆ _view
The documentation for this class was generated from the following file: