ERC CISST - cisst software

vctPlot2DBase Class Reference

#include <vctPlot2DBase.h>

Inheritance diagram for vctPlot2DBase:

Inheritance graph
[legend]
Collaboration diagram for vctPlot2DBase:

Collaboration graph
[legend]
List of all members.

Detailed Description

Base class for 2D plotters. Handles storage of 2D points, colors and thicknesses, computation of scales and offsets.

Definition at line 36 of file vctPlot2DBase.h.

Public Member Functions

Protected Types

Protected Member Functions

Protected Attributes

Classes


Member Function Documentation

bool vctPlot2DBase::AddTrace ( const std::string &  name,
size_t &  traceId 
)

Create a new trace, user needs to provide a placeholder to retrieve the traceId assigned. This method checks if the name has already been used. If so, the trace won't be added and the method returns false.

void vctPlot2DBase::SetNumberOfPoints ( size_t  numberOfPoints  ) 

Set the number of points for all traces.

void vctPlot2DBase::AddPoint ( size_t  trace,
const vctDouble2 point 
)

Add a point to a given trace

void vctPlot2DBase::FitX ( double  padding = 0.0  ) 

Data recentering, these methods re-align the data once only, based on all traces. Padding is used to make sure the data is not plotted at the extreme edges of the window. The padding parameter indicates the percentage of space that should be left empty. For example, a 200 pixel window with a padding of 0.1 (10%) will leave a band of 10 pixels empty on each side of the window. By default, the padding in X (horizontal) is null and 10% (0.1) in Y (vertical).

void vctPlot2DBase::FitX ( double  min,
double  max,
double  padding = 0.0 
)

Data recentering, these methods re-align the data once only, based on all traces. Padding is used to make sure the data is not plotted at the extreme edges of the window. The padding parameter indicates the percentage of space that should be left empty. For example, a 200 pixel window with a padding of 0.1 (10%) will leave a band of 10 pixels empty on each side of the window. By default, the padding in X (horizontal) is null and 10% (0.1) in Y (vertical).

void vctPlot2DBase::FitY ( double  padding = 0.1  ) 

Data recentering, these methods re-align the data once only, based on all traces. Padding is used to make sure the data is not plotted at the extreme edges of the window. The padding parameter indicates the percentage of space that should be left empty. For example, a 200 pixel window with a padding of 0.1 (10%) will leave a band of 10 pixels empty on each side of the window. By default, the padding in X (horizontal) is null and 10% (0.1) in Y (vertical).

void vctPlot2DBase::FitY ( double  min,
double  max,
double  padding = 0.1 
)

Data recentering, these methods re-align the data once only, based on all traces. Padding is used to make sure the data is not plotted at the extreme edges of the window. The padding parameter indicates the percentage of space that should be left empty. For example, a 200 pixel window with a padding of 0.1 (10%) will leave a band of 10 pixels empty on each side of the window. By default, the padding in X (horizontal) is null and 10% (0.1) in Y (vertical).

void vctPlot2DBase::FitXY ( const vctDouble2 padding = vctDouble2(0.0, 0.1)  ) 

Data recentering, these methods re-align the data once only, based on all traces. Padding is used to make sure the data is not plotted at the extreme edges of the window. The padding parameter indicates the percentage of space that should be left empty. For example, a 200 pixel window with a padding of 0.1 (10%) will leave a band of 10 pixels empty on each side of the window. By default, the padding in X (horizontal) is null and 10% (0.1) in Y (vertical).

void vctPlot2DBase::FitXY ( vctDouble2  min,
vctDouble2  max,
const vctDouble2 padding = vctDouble2(0.0, 0.1) 
)

Data recentering, these methods re-align the data once only, based on all traces. Padding is used to make sure the data is not plotted at the extreme edges of the window. The padding parameter indicates the percentage of space that should be left empty. For example, a 200 pixel window with a padding of 0.1 (10%) will leave a band of 10 pixels empty on each side of the window. By default, the padding in X (horizontal) is null and 10% (0.1) in Y (vertical).

void vctPlot2DBase::AlignMaxX ( void   ) 

Data recentering, these methods re-align the data once only, based on all traces. Padding is used to make sure the data is not plotted at the extreme edges of the window. The padding parameter indicates the percentage of space that should be left empty. For example, a 200 pixel window with a padding of 0.1 (10%) will leave a band of 10 pixels empty on each side of the window. By default, the padding in X (horizontal) is null and 10% (0.1) in Y (vertical).

void vctPlot2DBase::Freeze ( bool  freeze  ) 

Freeze the circular buffers, i.e. AddPoint does nothing. When turned off (parameter is false), this is equivalent to starting with an empty data set. These methods work on all traces at once.

bool vctPlot2DBase::GetFreeze ( void   )  const [inline]

Freeze the circular buffers, i.e. AddPoint does nothing. When turned off (parameter is false), this is equivalent to starting with an empty data set. These methods work on all traces at once.

Definition at line 119 of file vctPlot2DBase.h.

void vctPlot2DBase::SetContinuousFitX ( bool  fit  ) 

Automatic recentering

void vctPlot2DBase::SetContinuousFitY ( bool  fit  ) 

Automatic recentering

void vctPlot2DBase::SetContinuousAlignMaxX ( bool  align  ) 

Automatic recentering

bool vctPlot2DBase::GetContinuousFitX ( void   )  const [inline]

Automatic recentering

Definition at line 130 of file vctPlot2DBase.h.

bool vctPlot2DBase::GetContinuousFitY ( void   )  const [inline]

Automatic recentering

Definition at line 133 of file vctPlot2DBase.h.

bool vctPlot2DBase::GetContinuousAlignMaxX ( void   )  const [inline]

Automatic recentering

Definition at line 136 of file vctPlot2DBase.h.

void vctPlot2DBase::ComputeDataRangeX ( double &  min,
double &  max 
)

To fit the data in the viewport we need to compute the range for all traces. To reduce the number of computations, three methods are provided, one that compute the X range only, one for the Y range only and one for both X and Y. Each method uses a single loop.

void vctPlot2DBase::ComputeDataRangeY ( double &  min,
double &  max 
)

To fit the data in the viewport we need to compute the range for all traces. To reduce the number of computations, three methods are provided, one that compute the X range only, one for the Y range only and one for both X and Y. Each method uses a single loop.

void vctPlot2DBase::ComputeDataRangeXY ( vctDouble2 min,
vctDouble2 max 
)

To fit the data in the viewport we need to compute the range for all traces. To reduce the number of computations, three methods are provided, one that compute the X range only, one for the Y range only and one for both X and Y. Each method uses a single loop.

void vctPlot2DBase::SetColor ( size_t  traceId,
const vctDouble3 color 
)

Set color for a specific trace

void vctPlot2DBase::SetBackgroundColor ( const vctDouble3 color  ) 

Set background color, defined as RGB between 0 and 1.

virtual void vctPlot2DBase::RenderInitialize ( void   )  [protected, pure virtual]

Methods required in all derived classes

virtual void vctPlot2DBase::RenderResize ( double  width,
double  height 
) [protected, pure virtual]

Methods required in all derived classes

virtual void vctPlot2DBase::Render ( void   )  [protected, pure virtual]

Methods required in all derived classes

void vctPlot2DBase::ContinuousUpdate ( void   )  [protected]

Method called at each iteration to figure out if an automatic update is needed or not.


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu