Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
|
manages all the stuff displaying statistics on the graphics window. More...
#include <hudstatistics.h>
Classes | |
class | WindowStatistic |
Nested class WindowStatistic, which puts the measure and the graphics text together. More... | |
Public Member Functions | |
HUDStatisticsManager (osg::Geode *geode, osgText::Font *font, int ypos) | |
creates the HUDStatisticsManager, normally done by class Base. More... | |
virtual | ~HUDStatisticsManager () |
virtual StatisticMeasure * | getMeasure (double &observedValue, const char *measureName, MeasureMode mode, long stepSpan, double additionalParam=0) |
adds a variable to observe (on the window) and measure the value More... | |
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 More... | |
virtual double & | addMeasure (AbstractMeasure *measure) |
You can add another abstract measure you like. More... | |
virtual double & | addMeasureList (std::list< AbstractMeasure * > measureList) |
You can add another abstract measure you like. More... | |
virtual double & | addMeasureList (std::list< ComplexMeasure * > measureList) |
You can add another abstract measure you like. More... | |
virtual double & | addMeasureList (std::list< StatisticMeasure * > measureList) |
You can add another abstract measure you like. More... | |
virtual void | beginMeasureAt (long step) |
starts the measure at a specific time. More... | |
virtual bool | measureStarted () |
Tells you wether the measures have already been started. More... | |
virtual void | doOnCallBack (BackCaller *source, BackCaller::CallbackableType type=BackCaller::DEFAULT_CALLBACKABLE_TYPE) |
CALLBACKABLE INTERFACE. More... | |
virtual StatisticTools * | getStatisticTools () |
virtual WindowStatistic * | getMeasureWS (const std::string &measureName) |
searches for the measure with the given name and returns it windowstatistics (measure and graphics together) More... | |
virtual void | setColor (const Color &color) |
virtual void | setFontsize (int size) |
Public Member Functions inherited from Callbackable | |
Callbackable () | |
virtual | ~Callbackable () |
Protected Attributes | |
std::list< WindowStatistic * > | windowStatisticList |
the struct list which holds the measures and the appropiate text More... | |
StatisticTools * | statTool |
float | xInitPosition |
float | yInitPosition |
float | zInitPosition |
float | yOffset |
osg::Geode * | geode |
osgText::Font * | font |
Color | textColor |
int | fontsize |
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:
HUDStatisticsManager | ( | osg::Geode * | geode, |
osgText::Font * | font, | ||
int | ypos | ||
) |
creates the HUDStatisticsManager, normally done by class Base.
geode | this is the graphical node at wich the text objects are hooked in. |
|
virtual |
|
virtual |
adds a variable to observe (on the window) and measure the value
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. |
|
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
measure | the measure to add |
|
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.
measureList | the list of measures to add |
|
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.
measureList | the list of measures to add |
|
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.
measureList | the list of measures to add |
|
inlinevirtual |
starts the measure at a specific time.
This is useful if there are values that have to be ignored at simulation start.
step | number of steps (normally simsteps) to wait for beginning the measures |
|
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.
|
virtual |
adds a variable to observe (on the window) and measure the value
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. |
|
virtual |
searches for the measure with the given name and returns it windowstatistics (measure and graphics together)
|
inlinevirtual |
|
inlinevirtual |
Tells you wether the measures have already been started.
|
inlinevirtual |
|
inlinevirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
the struct list which holds the measures and the appropiate text
|
protected |
|
protected |
|
protected |
|
protected |