cisst-saw
Loading...
Searching...
No Matches
vctPlot2DBase::Scale Class Reference

#include <vctPlot2DBase.h>

Public Types

typedef std::map< std::string, Signal * > SignalsType
typedef std::map< std::string, VerticalLine * > VerticalLinesType

Public Member Functions

 Scale (const std::string &name, size_t pointDimension=2)
 ~Scale ()
const std::string & GetName (void) const
vctPlot2DBase::SignalAddSignal (const std::string &name)
bool RemoveSignal (const std::string &name)
bool RemoveSignal (const Signal *signal)
const SignalsTypeGetSignals (void) const
vctPlot2DBase::VerticalLineAddVerticalLine (const std::string &name)
void SetColor (const vctDouble3 &colorInRange0To1)
void Freeze (bool freeze)
bool GetFreeze (void) const
void ContinuousUpdate (void)
void SetContinuousFitX (bool fit)
void SetContinuousFitY (bool fit)
void SetContinuousExpandY (bool expand)
bool GetContinuousFitX (void) const
bool GetContinuousFitY (void) const
bool GetContinuousExpandY (void) const
const vctDouble2GetViewingRangeX (void)
const vctDouble2GetViewingRangeY (void)
bool ComputeDataRangeX (double &min, double &max, bool assumesDataSorted=false) const
bool ComputeDataRangeY (double &min, double &max)
bool ComputeDataRangeXY (vctDouble2 &min, vctDouble2 &max)
void AutoFitX (double padding=0.0)
void FitX (double min, double max, double padding=0.0)
void AutoFitY (double padding=0.1)
void AutoExpandY (double padding=0.1)
void FitY (double min, double max, double padding=0.1)
void AutoFitXY (const vctDouble2 &padding=vctDouble2(0.0, 0.1))
void AutoFitXExpandY (const vctDouble2 &padding=vctDouble2(0.0, 0.1))
void FitXY (vctDouble2 min, vctDouble2 max, const vctDouble2 &padding=vctDouble2(0.0, 0.1))

Public Attributes

SignalsType Signals
VerticalLinesType VerticalLines

Protected Attributes

bool ContinuousFitX
bool ContinuousFitY
bool ContinuousExpandY
double ExpandYMin
double ExpandYMax
vctDouble2 Viewport
vctDouble2 ViewingRangeX
vctDouble2 ViewingRangeY
vctDouble2 Translation
vctDouble2 ScaleValue

Friends

class vctPlot2DBase
class vctPlot2DOpenGL
class vctPlot2DVTK

Member Typedef Documentation

◆ SignalsType

typedef std::map<std::string, Signal *> vctPlot2DBase::Scale::SignalsType

◆ VerticalLinesType

typedef std::map<std::string, VerticalLine *> vctPlot2DBase::Scale::VerticalLinesType

Constructor & Destructor Documentation

◆ Scale()

vctPlot2DBase::Scale::Scale ( const std::string & name,
size_t pointDimension = 2 )

◆ ~Scale()

vctPlot2DBase::Scale::~Scale ( )

Member Function Documentation

◆ AddSignal()

vctPlot2DBase::Signal * vctPlot2DBase::Scale::AddSignal ( const std::string & name)

◆ AddVerticalLine()

vctPlot2DBase::VerticalLine * vctPlot2DBase::Scale::AddVerticalLine ( const std::string & name)

◆ AutoExpandY()

void vctPlot2DBase::Scale::AutoExpandY ( double padding = 0.1)

◆ AutoFitX()

void vctPlot2DBase::Scale::AutoFitX ( double padding = 0.0)

Data recentering, these methods re-align the data once only, based on all signals. 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).

◆ AutoFitXExpandY()

void vctPlot2DBase::Scale::AutoFitXExpandY ( const vctDouble2 & padding = vctDouble2(0.0, 0.1))

◆ AutoFitXY()

void vctPlot2DBase::Scale::AutoFitXY ( const vctDouble2 & padding = vctDouble2(0.0, 0.1))

◆ AutoFitY()

void vctPlot2DBase::Scale::AutoFitY ( double padding = 0.1)

◆ ComputeDataRangeX()

bool vctPlot2DBase::Scale::ComputeDataRangeX ( double & min,
double & max,
bool assumesDataSorted = false ) const

To fit the data in the viewport we need to compute the range for all signals. 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 calls the corresponding compute data range for all signals in the scale.

◆ ComputeDataRangeXY()

bool vctPlot2DBase::Scale::ComputeDataRangeXY ( vctDouble2 & min,
vctDouble2 & max )

◆ ComputeDataRangeY()

bool vctPlot2DBase::Scale::ComputeDataRangeY ( double & min,
double & max )

◆ ContinuousUpdate()

void vctPlot2DBase::Scale::ContinuousUpdate ( void )

◆ FitX()

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

◆ FitXY()

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

◆ FitY()

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

◆ Freeze()

void vctPlot2DBase::Scale::Freeze ( bool freeze)

◆ GetContinuousExpandY()

bool vctPlot2DBase::Scale::GetContinuousExpandY ( void ) const
inline

◆ GetContinuousFitX()

bool vctPlot2DBase::Scale::GetContinuousFitX ( void ) const
inline

Query automatic recentering settings.

◆ GetContinuousFitY()

bool vctPlot2DBase::Scale::GetContinuousFitY ( void ) const
inline

◆ GetFreeze()

bool vctPlot2DBase::Scale::GetFreeze ( void ) const

◆ GetName()

const std::string & vctPlot2DBase::Scale::GetName ( void ) const

◆ GetSignals()

const SignalsType & vctPlot2DBase::Scale::GetSignals ( void ) const
inline

◆ GetViewingRangeX()

const vctDouble2 & vctPlot2DBase::Scale::GetViewingRangeX ( void )
inline

◆ GetViewingRangeY()

const vctDouble2 & vctPlot2DBase::Scale::GetViewingRangeY ( void )
inline

◆ RemoveSignal() [1/2]

bool vctPlot2DBase::Scale::RemoveSignal ( const Signal * signal)

◆ RemoveSignal() [2/2]

bool vctPlot2DBase::Scale::RemoveSignal ( const std::string & name)

◆ SetColor()

void vctPlot2DBase::Scale::SetColor ( const vctDouble3 & colorInRange0To1)

◆ SetContinuousExpandY()

void vctPlot2DBase::Scale::SetContinuousExpandY ( bool expand)

◆ SetContinuousFitX()

void vctPlot2DBase::Scale::SetContinuousFitX ( bool fit)

Set options to tell Continuous update how to recenter the scale based on the signals.

◆ SetContinuousFitY()

void vctPlot2DBase::Scale::SetContinuousFitY ( bool fit)

◆ vctPlot2DBase

friend class vctPlot2DBase
friend

◆ vctPlot2DOpenGL

friend class vctPlot2DOpenGL
friend

◆ vctPlot2DVTK

friend class vctPlot2DVTK
friend

Member Data Documentation

◆ ContinuousExpandY

bool vctPlot2DBase::Scale::ContinuousExpandY
protected

◆ ContinuousFitX

bool vctPlot2DBase::Scale::ContinuousFitX
protected

◆ ContinuousFitY

bool vctPlot2DBase::Scale::ContinuousFitY
protected

◆ ExpandYMax

double vctPlot2DBase::Scale::ExpandYMax
protected

◆ ExpandYMin

double vctPlot2DBase::Scale::ExpandYMin
protected

◆ ScaleValue

vctDouble2 vctPlot2DBase::Scale::ScaleValue
protected

◆ Signals

SignalsType vctPlot2DBase::Scale::Signals

◆ Translation

vctDouble2 vctPlot2DBase::Scale::Translation
protected

◆ VerticalLines

VerticalLinesType vctPlot2DBase::Scale::VerticalLines

◆ ViewingRangeX

vctDouble2 vctPlot2DBase::Scale::ViewingRangeX
protected

◆ ViewingRangeY

vctDouble2 vctPlot2DBase::Scale::ViewingRangeY
protected

◆ Viewport

vctDouble2 vctPlot2DBase::Scale::Viewport
protected

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