HUDStatisticsManager Class Reference

manages all the stuff displaying statistics on the graphics window. More...

#include <hudstatistics.h>

Inherits Callbackable.

Inheritance diagram for HUDStatisticsManager:

Inheritance graph
[legend]
Collaboration diagram for HUDStatisticsManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 HUDStatisticsManager (osg::Geode *geode, osgText::Font *font)
 creates the HUDStatisticsManager, normally done by class Base.
virtual ~HUDStatisticsManager ()
virtual StatisticMeasuregetMeasure (double &observedValue, const char *measureName, MeasureMode mode, long stepSpan, double additionalParam=0)
 adds a variable to observe (on the window) and measure the value
virtual double & addMeasure (double &observedValue, const char *measureName, MeasureMode mode, long stepSpan, double additionalParam=0)
 adds a variable to observe (on the window) and measure the value
virtual double & addMeasure (AbstractMeasure *measure)
 You can add another abstract measure you like.
virtual double & addMeasureList (std::list< AbstractMeasure * > measureList)
 You can add another abstract measure you like.
virtual double & addMeasureList (std::list< ComplexMeasure * > measureList)
 You can add another abstract measure you like.
virtual double & addMeasureList (std::list< StatisticMeasure * > measureList)
 You can add another abstract measure you like.
virtual void beginMeasureAt (long step)
 starts the measure at a specific time.
virtual bool measureStarted ()
 Tells you wether the measures have already been started.
virtual void doOnCallBack (BackCaller *source, BackCaller::CallbackableType type=BackCaller::DEFAULT_CALLBACKABLE_TYPE)
 CALLBACKABLE INTERFACE.
virtual StatisticToolsgetStatisticTools ()
virtual void setColor (const Color &color)
virtual void setFontsize (int size)

Protected Attributes

std::list< WindowStatistic * > windowStatisticList
 the struct list which holds the measures and the appropiate text
StatisticToolsstatTool
float xInitPosition
float yInitPosition
float zInitPosition
float yOffset
osg::Geode * geode
osgText::Font * font
Color textColor
int fontsize

Classes

class  WindowStatistic
 Nested class WindowStatistic, which puts the measure and the graphics text together. More...

Detailed Description

manages all the stuff displaying statistics on the graphics window.

This is a experimental version, so do not to be afraid changing this crazy code.

This class uses the implementation of the class StatisticTools, which is generalized to make nice statistics. Instead of passing the values to the guilogger (INSPECTABLE interface), we simply diplay this values on the graphics window.

So how it works:


Constructor & Destructor Documentation

HUDStatisticsManager ( osg::Geode *  geode,
osgText::Font *  font 
)

creates the HUDStatisticsManager, normally done by class Base.

Parameters:
geode this is the graphical node at wich the text objects are hooked in.

virtual ~HUDStatisticsManager (  )  [inline, virtual]


Member Function Documentation

double & addMeasure ( AbstractMeasure measure  )  [virtual]

You can add another abstract measure you like.

in some cases (e.g. complex measures) it is better to let the measure decide how it likes to be initialized

Parameters:
measure the measure to add

double & addMeasure ( double &  observedValue,
const char *  measureName,
MeasureMode  mode,
long  stepSpan,
double  additionalParam = 0 
) [virtual]

adds a variable to observe (on the window) and measure the value

Parameters:
observedValue the value to observe.
measureName the name of the measured value
mode the mode of measure
stepSpan in most cases the stepSpan is important to get the measured value of a number of steps, like AVG: if stepSpan = 0, AVG is calculated over all steps if stepSpan = n, AVG is calculated over the LAST n steps The same counts for all the other MeasureModes.
additionalParam is used for example for mode PEAK, the param is the limit value, all values minus limit are displayed, values below the limit are set to 0. In CONV mode (test the convergence), this value is the epsilon criteria.
Returns:
the object StatisticMeasure. Use addMeasure(...) instead of getMeasure(...) to obtain the value adress of the calculated statistic.
See also:
StatisticTools

StatisticMeasure

double & addMeasureList ( std::list< StatisticMeasure * >  measureList  )  [virtual]

You can add another abstract measure you like.

in some cases (e.g. complex measures) it is better to let the measure decide how it likes to be initialized With this method you can add a list of AbstractMeasures.

Parameters:
measureList the list of measures to add

double & addMeasureList ( std::list< ComplexMeasure * >  measureList  )  [virtual]

You can add another abstract measure you like.

in some cases (e.g. complex measures) it is better to let the measure decide how it likes to be initialized With this method you can add a list of AbstractMeasures.

Parameters:
measureList the list of measures to add

double & addMeasureList ( std::list< AbstractMeasure * >  measureList  )  [virtual]

You can add another abstract measure you like.

in some cases (e.g. complex measures) it is better to let the measure decide how it likes to be initialized With this method you can add a list of AbstractMeasures.

Parameters:
measureList the list of measures to add

virtual void beginMeasureAt ( long  step  )  [inline, virtual]

starts the measure at a specific time.

This is useful if there are values that have to be ignored at simulation start.

Parameters:
step number of steps (normally simsteps) to wait for beginning the measures

void doOnCallBack ( BackCaller source,
BackCaller::CallbackableType  type = BackCaller::DEFAULT_CALLBACKABLE_TYPE 
) [virtual]

CALLBACKABLE INTERFACE.

this method is invoked when a callback is done from the class where this class is for callback registered, it is overwritten

Implements Callbackable.

StatisticMeasure * getMeasure ( double &  observedValue,
const char *  measureName,
MeasureMode  mode,
long  stepSpan,
double  additionalParam = 0 
) [virtual]

adds a variable to observe (on the window) and measure the value

Parameters:
observedValue the value to observe.
measureName the name of the measured value
mode the mode of measure
stepSpan in most cases the stepSpan is important to get the measured value of a number of steps, like AVG: if stepSpan = 0, AVG is calculated over all steps if stepSpan = n, AVG is calculated over the LAST n steps The same counts for all the other MeasureModes.
additionalParam is used for example for mode PEAK, the param is the limit value, all values minus limit are displayed, values below the limit are set to 0. In CONV mode (test the convergence), this value is the epsilon criteria.
Returns:
the object StatisticMeasure. Use addMeasure(...) instead of getMeasure(...) to obtain the value adress of the calculated statistic.
See also:
StatisticTools

StatisticMeasure

virtual StatisticTools* getStatisticTools (  )  [inline, virtual]

virtual bool measureStarted (  )  [inline, virtual]

Tells you wether the measures have already been started.

virtual void setColor ( const Color color  )  [inline, virtual]

virtual void setFontsize ( int  size  )  [inline, virtual]


Member Data Documentation

osgText::Font* font [protected]

int fontsize [protected]

osg::Geode* geode [protected]

StatisticTools* statTool [protected]

Color textColor [protected]

std::list<WindowStatistic*> windowStatisticList [protected]

the struct list which holds the measures and the appropiate text

float xInitPosition [protected]

float yInitPosition [protected]

float yOffset [protected]

float zInitPosition [protected]


The documentation for this class was generated from the following files:
Generated on Fri Oct 30 16:29:03 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7