Draw2D
|
Implementation drawing 2D class using gnuplot Class implements proxy between gnuplot and C++ code. More...
#include <Dr2D_gnuplot_api.hh>
Public Member Functions | |
APIGnuPlot2D ()=delete | |
deleted non-parametric constructor to force using parametric. | |
APIGnuPlot2D (double minX, double maxX, double minY, double maxY, int ref_time_ms=0) | |
Constructor. More... | |
~APIGnuPlot2D () | |
destructor, also stops gnuplot proces. | |
uint | draw_line (const Point2D &point1, const Point2D &point2, const std::string &color="black") override |
draws line between 2 points More... | |
uint | draw_polygonal_chain (const std::vector< Point2D > &points, const std::string &color="black") override |
draws polygonal_chain between n points More... | |
void | erase_shape (uint id) override |
draws polyhedron described by its apexs More... | |
void | change_shape_color (uint id, const std::string &color) override |
change color of shape More... | |
void | change_ref_time_ms (int ref_time_ms) override |
change mode for ploting and/or time between auto-replots More... | |
void | redraw () override |
replot all shapes Replots all shapes, works only in negative refresh_rate_ms value mode. | |
![]() | |
Draw2DAPI (int ref_time_ms=0) | |
Constructor. More... | |
Additional Inherited Members | |
![]() | |
int | refresh_rate_ms |
mode for ploting and time between auto-replots More... | |
Implementation drawing 2D class using gnuplot Class implements proxy between gnuplot and C++ code.
Colors are pre-defined or must be on form rgb:#rrggbb.
Pre defined colors: black, white, grey, blue, light-blue, red, green, yellow, orange, purple, as it was in default palette in Matlab 2014b.
Class have 3 modes, described in refresh_rate_ms variable.
APIGnuPlot2D::APIGnuPlot2D | ( | double | minX, |
double | maxX, | ||
double | minY, | ||
double | maxY, | ||
int | ref_time_ms = 0 |
||
) |
Constructor.
minX | - lower bounry in X axis, |
maxX | - upper bounry in X axis, |
minY | - lower bounry in Y axis, |
maxY | - upper bounry in Y axis, |
minZ | - lower bounry in Z axis, |
maxZ | - upper bounry in Z axis, |
ref_time_ms | - mode for plotting (negative, 0, positive, see refresh_rate_ms) and time between auto-replots (in miliseconds). |
|
overridevirtual |
change mode for ploting and/or time between auto-replots
ref_time_ms | - mode for plotting (negative, 0, positive, see refresh_rate_ms) and time between auto-replots (in miliseconds). |
Implements drawNS::Draw2DAPI.
|
overridevirtual |
change color of shape
id | - id of shape |
color | - color of line (see class description) |
Implements drawNS::Draw2DAPI.
|
overridevirtual |
draws line between 2 points
point1 | - first point |
point2 | - second point |
color | - color of line (see class description) |
Implements drawNS::Draw2DAPI.
|
overridevirtual |
draws polygonal_chain between n points
points | - vector of points |
color | - color of line (see class description) |
Implements drawNS::Draw2DAPI.
|
overridevirtual |
draws polyhedron described by its apexs
points_map | - vector of points vectors. Every vector contains points describes one "layer" of polyhedron |
color | - color of line (see class description) |
Implements drawNS::Draw2DAPI.