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);
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;
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;
131 private: std::unique_ptr<PlotCurvePrivate> dataPtr;
gui
Definition KeyEventHandler.hh:29
A plotting widget that handles incremental addition of data.
Definition IncrementalPlot.hh:47
Plot Curve data.
Definition PlotCurve.hh:42
std::vector< ignition::math::Vector2d > Points() const
Return all the sample points in the curve.
unsigned int Size() const
Get the number of data points in the curve.
ignition::math::Vector2d Min()
Get the min x and y values of this curve.
bool Active() const
Get whether the curve is active.
void SetAge(const unsigned int _age)
Set the age of the curve.
std::string Label() const
Get the curve label.
void SetLabel(const std::string &_label)
Set the curve label.
void SetActive(const bool _active)
Set whether the curve should be active.
ignition::math::Vector2d Point(const unsigned int _index) const
Get a point in the curve.
void Attach(IncrementalPlot *_plot)
Attach the curve to a plot.
void Clear()
Clear all data from the curve.
ignition::math::Vector2d Max()
Get the max x and y values of this curve.
unsigned int Id() const
Get the curve id.
void Detach()
Detach the curve from the plot.
PlotCurve(const std::string &_label)
Constructor.
void AddPoints(const std::vector< ignition::math::Vector2d > &_pt)
Add points to the curve.
unsigned int Age() const
Get the age of the curve.
void SetId(const unsigned int _id)
Set the curve id.
void AddPoint(const ignition::math::Vector2d &_pt)
Add a point to the curve.
Forward declarations for the common classes.
Definition Animation.hh:27