Go to the documentation of this file.
17 #ifndef GAZEBO_GUI_PLOT_PLOTCURVE_HH_
18 #define GAZEBO_GUI_PLOT_PLOTCURVE_HH_
24 #include <ignition/math/Vector2.hh>
36 class PlotCurvePrivate;
38 class IncrementalPlot;
45 public:
explicit PlotCurve(
const std::string &_label);
52 public:
void AddPoint(
const ignition::math::Vector2d &_pt);
56 public:
void AddPoints(
const std::vector<ignition::math::Vector2d> &_pt);
66 public:
void Detach();
70 public:
void SetLabel(
const std::string &_label);
74 public: std::string Label()
const;
78 public:
void SetId(
const unsigned int _id);
82 public:
unsigned int Id()
const;
87 public:
void SetActive(
const bool _active);
91 public:
bool Active()
const;
96 public:
void SetAge(
const unsigned int _age);
100 public:
unsigned int Age()
const;
104 public:
unsigned int Size()
const;
108 public: ignition::math::Vector2d Min();
112 public: ignition::math::Vector2d Max();
118 public: ignition::math::Vector2d Point(
const unsigned int _index)
const;
122 public: std::vector<ignition::math::Vector2d> Points()
const;
127 public: QwtPlotCurve *Curve();
131 private: std::unique_ptr<PlotCurvePrivate> dataPtr;
PlotCurve(const std::string &_label)
Constructor.
ignition::math::Vector2d Max()
Get the max x and y values of this curve.
Forward declarations for the common classes.
Definition: Animation.hh:26
void SetActive(const bool _active)
Set whether the curve should be active.
void SetAge(const unsigned int _age)
Set the age of the curve.
void SetLabel(const std::string &_label)
Set the curve label.
unsigned int Size() const
Get the number of data points in the curve.
bool Active() const
Get whether the curve is active.
void Clear()
Clear all data from the curve.
std::string Label() const
Get the curve label.
ignition::math::Vector2d Point(const unsigned int _index) const
Get a point in the curve.
Plot Curve data.
Definition: PlotCurve.hh:41
unsigned int Age() const
Get the age of the curve.
A plotting widget that handles incremental addition of data.
Definition: IncrementalPlot.hh:46
void AddPoints(const std::vector< ignition::math::Vector2d > &_pt)
Add points to the curve.
void Attach(IncrementalPlot *_plot)
Attach the curve to a plot.
std::vector< ignition::math::Vector2d > Points() const
Return all the sample points in the curve.
void Detach()
Detach the curve from the plot.
ignition::math::Vector2d Min()
Get the min x and y values of this curve.
void SetId(const unsigned int _id)
Set the curve id.
unsigned int Id() const
Get the curve id.
void AddPoint(const ignition::math::Vector2d &_pt)
Add a point to the curve.