cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
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

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

Constructor & Destructor Documentation

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

Member Function Documentation

vctPlot2DBase::Signal* vctPlot2DBase::Scale::AddSignal ( const std::string &  name)
vctPlot2DBase::VerticalLine* vctPlot2DBase::Scale::AddVerticalLine ( const std::string &  name)
void vctPlot2DBase::Scale::AutoExpandY ( double  padding = 0.1)
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).

void vctPlot2DBase::Scale::AutoFitXExpandY ( const vctDouble2 padding = vctDouble2(0.0, 0.1))
void vctPlot2DBase::Scale::AutoFitXY ( const vctDouble2 padding = vctDouble2(0.0, 0.1))
void vctPlot2DBase::Scale::AutoFitY ( double  padding = 0.1)
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.

bool vctPlot2DBase::Scale::ComputeDataRangeXY ( vctDouble2 min,
vctDouble2 max 
)
bool vctPlot2DBase::Scale::ComputeDataRangeY ( double &  min,
double &  max 
)
void vctPlot2DBase::Scale::ContinuousUpdate ( void  )
void vctPlot2DBase::Scale::FitX ( double  min,
double  max,
double  padding = 0.0 
)
void vctPlot2DBase::Scale::FitXY ( vctDouble2  min,
vctDouble2  max,
const vctDouble2 padding = vctDouble2(0.0, 0.1) 
)
void vctPlot2DBase::Scale::FitY ( double  min,
double  max,
double  padding = 0.1 
)
void vctPlot2DBase::Scale::Freeze ( bool  freeze)
bool vctPlot2DBase::Scale::GetContinuousExpandY ( void  ) const
inline
bool vctPlot2DBase::Scale::GetContinuousFitX ( void  ) const
inline

Query automatic recentering settings.

bool vctPlot2DBase::Scale::GetContinuousFitY ( void  ) const
inline
bool vctPlot2DBase::Scale::GetFreeze ( void  ) const
const std::string& vctPlot2DBase::Scale::GetName ( void  ) const
const SignalsType& vctPlot2DBase::Scale::GetSignals ( void  ) const
inline
const vctDouble2& vctPlot2DBase::Scale::GetViewingRangeX ( void  )
inline
const vctDouble2& vctPlot2DBase::Scale::GetViewingRangeY ( void  )
inline
bool vctPlot2DBase::Scale::RemoveSignal ( const std::string &  name)
bool vctPlot2DBase::Scale::RemoveSignal ( const Signal signal)
void vctPlot2DBase::Scale::SetColor ( const vctDouble3 colorInRange0To1)
void vctPlot2DBase::Scale::SetContinuousExpandY ( bool  expand)
void vctPlot2DBase::Scale::SetContinuousFitX ( bool  fit)

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

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

Friends And Related Function Documentation

friend class vctPlot2DBase
friend
friend class vctPlot2DOpenGL
friend
friend class vctPlot2DVTK
friend

Member Data Documentation

bool vctPlot2DBase::Scale::ContinuousExpandY
protected
bool vctPlot2DBase::Scale::ContinuousFitX
protected
bool vctPlot2DBase::Scale::ContinuousFitY
protected
double vctPlot2DBase::Scale::ExpandYMax
protected
double vctPlot2DBase::Scale::ExpandYMin
protected
vctDouble2 vctPlot2DBase::Scale::ScaleValue
protected
SignalsType vctPlot2DBase::Scale::Signals
vctDouble2 vctPlot2DBase::Scale::Translation
protected
VerticalLinesType vctPlot2DBase::Scale::VerticalLines
vctDouble2 vctPlot2DBase::Scale::ViewingRangeX
protected
vctDouble2 vctPlot2DBase::Scale::ViewingRangeY
protected
vctDouble2 vctPlot2DBase::Scale::Viewport
protected

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