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()

PlotCurve ( const std::string &  _label)
explicit

Constructor.

Parameters
[in]_labelPlot label.

◆ ~PlotCurve()

~PlotCurve ( )

Destructor.

Member Function Documentation

◆ Active()

bool Active ( ) const

Get whether the curve is active.

Returns
Active state of the plot curve

◆ AddPoint()

void AddPoint ( const ignition::math::Vector2d &  _pt)

Add a point to the curve.

Parameters
[in]_ptPoint to add.

◆ AddPoints()

void AddPoints ( const std::vector< ignition::math::Vector2d > &  _pt)

Add points to the curve.

Parameters
[in]_ptsPoints to add.

◆ Age()

unsigned int Age ( ) const

Get the age of the curve.

Returns
Curve age

◆ Attach()

void Attach ( IncrementalPlot _plot)

Attach the curve to a plot.

Parameters
[in]_plotPlot to attach to.

◆ Clear()

void Clear ( )

Clear all data from the curve.

◆ Curve()

QwtPlotCurve* Curve ( )

◆ Detach()

void Detach ( )

Detach the curve from the plot.

◆ Id()

unsigned int Id ( ) const

Get the curve id.

Returns
Curve id

◆ Label()

std::string Label ( ) const

Get the curve label.

Returns
Curve label

◆ Max()

ignition::math::Vector2d Max ( )

Get the max x and y values of this curve.

Returns
Point with max values

◆ Min()

ignition::math::Vector2d Min ( )

Get the min x and y values of this curve.

Returns
Point with min values

◆ Point()

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.

◆ Points()

std::vector<ignition::math::Vector2d> Points ( ) const

Return all the sample points in the curve.

Returns
Curve sample points

◆ SetActive()

void SetActive ( const bool  _active)

Set whether the curve should be active.

Parameters
[in]_activeTrue to make the curve active and accept new points.

◆ SetAge()

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.

◆ SetId()

void SetId ( const unsigned int  _id)

Set the curve id.

Parameters
[in]_idId to set the curve to.

◆ SetLabel()

void SetLabel ( const std::string &  _label)

Set the curve label.

Parameters
[in]_labelLabel to set the curve to

◆ Size()

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: