PlotCurve Class Reference

Plot Curve data. More...

#include <PlotCurve.hh>

Public Member Functions

 PlotCurve (const std::string &_label)
 Constructor. More...
 
 ~PlotCurve ()
 Destructor. More...
 
bool Active () const
 Get whether the curve is active. More...
 
void AddPoint (const ignition::math::Vector2d &_pt)
 Add a point to the curve. More...
 
void AddPoints (const std::vector< ignition::math::Vector2d > &_pt)
 Add points to the curve. More...
 
unsigned int Age () const
 Get the age of the curve. More...
 
void Attach (IncrementalPlot *_plot)
 Attach the curve to a plot. More...
 
void Clear ()
 Clear all data from the curve. More...
 
QwtPlotCurve * Curve ()
 
void Detach ()
 Detach the curve from the plot. More...
 
unsigned int Id () const
 Get the curve id. More...
 
std::string Label () const
 Get the curve label. More...
 
ignition::math::Vector2d Max ()
 Get the max x and y values of this curve. More...
 
ignition::math::Vector2d Min ()
 Get the min x and y values of this curve. More...
 
ignition::math::Vector2d Point (const unsigned int _index) const
 Get a point in the curve. More...
 
std::vector
< ignition::math::Vector2d > 
Points () const
 Return all the sample points in the curve. More...
 
void SetActive (const bool _active)
 Set whether the curve should be active. More...
 
void SetAge (const unsigned int _age)
 Set the age of the curve. More...
 
void SetId (const unsigned int _id)
 Set the curve id. More...
 
void SetLabel (const std::string &_label)
 Set the curve label. More...
 
unsigned int Size () const
 Get the number of data points in the curve. More...
 

Detailed Description

Plot Curve data.

Constructor & Destructor Documentation

PlotCurve ( const std::string &  _label)

Constructor.

Parameters
[in]_labelPlot label.
~PlotCurve ( )

Destructor.

Member Function Documentation

bool Active ( ) const

Get whether the curve is active.

Returns
Active state of the plot curve
void AddPoint ( const ignition::math::Vector2d &  _pt)

Add a point to the curve.

Parameters
[in]_ptPoint to add.
void AddPoints ( const std::vector< ignition::math::Vector2d > &  _pt)

Add points to the curve.

Parameters
[in]_ptsPoints to add.
unsigned int Age ( ) const

Get the age of the curve.

Returns
Curve age
void Attach ( IncrementalPlot _plot)

Attach the curve to a plot.

Parameters
[in]_plotPlot to attach to.
void Clear ( )

Clear all data from the curve.

QwtPlotCurve* Curve ( )
void Detach ( )

Detach the curve from the plot.

unsigned int Id ( ) const

Get the curve id.

Returns
Curve id
std::string Label ( ) const

Get the curve label.

Returns
Curve label
ignition::math::Vector2d Max ( )

Get the max x and y values of this curve.

Returns
Point with max values
ignition::math::Vector2d Min ( )

Get the min x and y values of this curve.

Returns
Point with min values
ignition::math::Vector2d Point ( const unsigned int  _index) const

Get a point in the curve.

Parameters
[in]_indexIndex of the point in the curve.
Returns
2d point at the specified index. A Vector2d of nans is returned if the index is out of bounds.
std::vector<ignition::math::Vector2d> Points ( ) const

Return all the sample points in the curve.

Returns
Curve sample points
void SetActive ( const bool  _active)

Set whether the curve should be active.

Parameters
[in]_activeTrue to make the curve active and accept new points.
void SetAge ( const unsigned int  _age)

Set the age of the curve.

Parameters
[in]_ageAge of the curve. Currently used to keep track of how many restarts it has been through.
void SetId ( const unsigned int  _id)

Set the curve id.

Parameters
[in]_idId to set the curve to.
void SetLabel ( const std::string &  _label)

Set the curve label.

Parameters
[in]_labelLabel to set the curve to
unsigned int Size ( ) const

Get the number of data points in the curve.

Returns
Number of data points.

The documentation for this class was generated from the following file: