|
cisst-saw
|
#include <vctPlot2DBase.h>
Public Member Functions | |
| Signal (const std::string &name, size_t numberOfPoints, size_t pointDimension=2) | |
| ~Signal () | |
| void CISST_DEPRECATED | AddPoint (const vctDouble2 &point) |
| void | AppendPoint (const vctDouble2 &point) |
| bool | GetFreeze (void) const |
| void | ComputeDataRangeX (double &min, double &max, bool assumesDataSorted=false) const |
| void | ComputeDataRangeY (double &min, double &max) const |
| void | ComputeDataRangeXY (vctDouble2 &min, vctDouble2 &max) const |
| void CISST_DEPRECATED | SetNumberOfPoints (size_t numberOfPoints) |
| void CISST_DEPRECATED | GetNumberOfPoints (size_t &numberOfPoints, size_t &bufferSize) const |
| size_t | GetSize (void) const |
| size_t | GetNumberOfPoints (void) const |
| void | SetColor (const vctDouble3 &colorInRange0To1) |
| void | SetSize (size_t numberOfPoints) |
| bool | IsVisible (void) const |
| void | SetVisible (const bool visible) |
| void | Resize (size_t numberOfPoints, bool trimOlder=true) |
| vctPlot2DBase::Signal * | AddSignal (const std::string &name) |
| vctPlot2DBase::Scale * | GetParent (void) |
| const std::string & | GetName (void) const |
Public Attributes | |
| vctDouble2 GetPointAt(size_t index) CISST_THROW(std void SetPointAt(size_t index, const vctDouble2 &point) CISST_THROW(std void SetArrayAt(size_t index, const double *pointArray, size_t arraySize, size_t pointDimension=2) CISST_THROW(std bool PrependArray(const double *pointArray, size_t arraySize, size_t pointDimension=2) CISST_THROW(std bool AppendArray(const double *pointArray, size_t arraySize, size_t pointDimension=2) CISST_THROW(std void | Freeze (bool freeze) |
Protected Types | |
| typedef vctFixedSizeVectorRef< double, 2, 1 > | PointRef |
Protected Attributes | |
| Scale * | Parent |
| std::string | Name |
| bool | Empty |
| bool | Visible |
| bool | Frozen |
| double * | Buffer |
| size_t | PointSize |
| vctDynamicVector< PointRef > | Data |
| size_t | IndexFirst |
| size_t | IndexLast |
| vctDouble3 | Color |
| double | LineWidth |
Friends | |
| class | vctPlot2DBase |
| class | vctPlot2DBase::Scale |
| class | vctPlot2DOpenGL |
| class | vctPlot2DVTK |
Storage for a given signal. Each signal stores the data to display in a vector (vctDynamicVector) of points (vctDouble2). To prevent dynamic re-allocation, this class uses a "circular buffer".
|
protected |
Vector of references to the data to add, compute min/max, ...
| vctPlot2DBase::Signal::Signal | ( | const std::string & | name, |
| size_t | numberOfPoints, | ||
| size_t | pointDimension = 2 ) |
| vctPlot2DBase::Signal::~Signal | ( | ) |
| void CISST_DEPRECATED vctPlot2DBase::Signal::AddPoint | ( | const vctDouble2 & | point | ) |
| vctPlot2DBase::Signal * vctPlot2DBase::Signal::AddSignal | ( | const std::string & | name | ) |
| void vctPlot2DBase::Signal::AppendPoint | ( | const vctDouble2 & | point | ) |
Insert point at last position and move last position forward. If the circular buffer is full, this methods overwrite the first element.
| void vctPlot2DBase::Signal::ComputeDataRangeX | ( | double & | min, |
| double & | max, | ||
| bool | assumesDataSorted = false ) const |
Compute min and max over all points to recenter display. If the buffer contains no point, returns 0.
| void vctPlot2DBase::Signal::ComputeDataRangeXY | ( | vctDouble2 & | min, |
| vctDouble2 & | max ) const |
| void vctPlot2DBase::Signal::ComputeDataRangeY | ( | double & | min, |
| double & | max ) const |
| bool vctPlot2DBase::Signal::GetFreeze | ( | void | ) | const |
| const std::string & vctPlot2DBase::Signal::GetName | ( | void | ) | const |
| void CISST_DEPRECATED vctPlot2DBase::Signal::GetNumberOfPoints | ( | size_t & | numberOfPoints, |
| size_t & | bufferSize ) const |
| size_t vctPlot2DBase::Signal::GetNumberOfPoints | ( | void | ) | const |
Get number of points.
| vctPlot2DBase::Scale * vctPlot2DBase::Signal::GetParent | ( | void | ) |
| size_t vctPlot2DBase::Signal::GetSize | ( | void | ) | const |
Get size of circular buffer.
| bool vctPlot2DBase::Signal::IsVisible | ( | void | ) | const |
| void vctPlot2DBase::Signal::Resize | ( | size_t | numberOfPoints, |
| bool | trimOlder = true ) |
Non destructive resize. If the new buffer is bigger, preserves all points. If the new buffer is smaller, preserves the data at the end by default.
| void vctPlot2DBase::Signal::SetColor | ( | const vctDouble3 & | colorInRange0To1 | ) |
| void CISST_DEPRECATED vctPlot2DBase::Signal::SetNumberOfPoints | ( | size_t | numberOfPoints | ) |
| void vctPlot2DBase::Signal::SetSize | ( | size_t | numberOfPoints | ) |
Destructive resize, this method resize the circular buffer and sets the first and last pointers to the buffer's beginning.
| void vctPlot2DBase::Signal::SetVisible | ( | const bool | visible | ) |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
Actual buffer containing the data, contiguous for rendering
|
protected |
|
protected |
|
protected |
| vctDouble2 GetPointAt(size_t index) CISST_THROW(std void SetPointAt(size_t index, const vctDouble2 &point) CISST_THROW(std void SetArrayAt(size_t index, const double *pointArray, size_t arraySize, size_t pointDimension=2) CISST_THROW(std bool PrependArray(const double *pointArray, size_t arraySize, size_t pointDimension=2) CISST_THROW(std bool AppendArray(const double *pointArray, size_t arraySize, size_t pointDimension=2) CISST_THROW(std void vctPlot2DBase::Signal::Freeze(bool freeze) |
Get point value in the buffer relative to first element. This method will throw an std::runtime_error if the index is invalid, i.e. greater than the buffer size.
Set point value at a given position, relative to first element. This method will throw an std::runtime_error if the index is invalid, i.e. greater than the buffer size.
Replaces "size" points data starting at "index". This methods assumes that the point size of the user provided buffer matches the internal buffer. If either the point size, index or size of user provided data is incorrect, an exception is thrown.
Prepend user provided data at the beginning of the circular buffer. If the buffer is full or doesn't have enough free space, data will be overwritten at the end of buffer. This method will throw an exception if either the array size or index is invalid.
Append user provided data at the end of the circular buffer. If the buffer is full or doesn't have enough free space, data will be overwritten at the beginning of buffer. This method will throw an exception if either the array size or index is invalid.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Signal name, used for GUI
|
protected |
|
protected |
|
protected |