Robot Simulator of the Robotics Group for Self-Organization of Control: Base Class Reference

# Base Class Reference

`#include <base.h>`

Inherits Configurable.

Inherited by Simulation.

Collaboration diagram for Base:
[legend]

List of all members.

## Public Member Functions
| Base (const std::string &caption="LpzRobots Simulator (Martius et al)")
virtual void | makePhysicsScene ()
| create the ground plane
virtual void | makeScene (OsgScene *scene, const OsgConfig &config)
| creates the base scene graph with world, sky and floor and shadow and HUD and stores it in scene
virtual osg::Node * | makeSky (const OsgConfig &config)
virtual osg::Node * | makeGround (const OsgConfig &config)
virtual osg::Node * | createHUD (OsgScene *scene, const OsgConfig &config)
| creates hud and is supposed to return the camera to it and adds the geode of the hud to the scene
virtual void | createHUDManager (osg::Geode *geode, osgText::Font *font)
virtual void | makeLights (osg::Group *node, const OsgConfig &config)
| adds light to the node
virtual osgShadow::ShadowedScene * | createShadowedScene (osg::Node *sceneToShadow, osg::LightSource *lightSource, int shadowType)
| Shadow types: 1 - ShadowVolume 2 - ShadowTextue 3 - ParallelSplitShadowMap 4 - SoftShadowMap 5 - ShadowMap.
virtual void | setGroundTexture (const char *filename)
virtual void | setCaption (const std::string &caption)
| sets the cpation that is printed at the right of the status line
virtual void | setTitle (const std::string &title)
| sets the title that is printed in the center of the status line
virtual HUDStatisticsManager * | getHUDSM ()
| Create HUDStatisticsManager and register it for being called back every step.
virtual | ~Base ()
## Static Public Member Functions
static int | contains (char **list, int len, const char *str)
| returns the index+1 if the list contains the given string or 0 if not
## Static Public Attributes
static const int | PHYSICS_CALLBACKABLE = 1
| called each ode/physics step
static const int | GRAPHICS_CALLBACKABLE = 2
| called each osg/draw step
## Protected Member Functions
virtual void | setTimeStats (double time, double realtimefactor, double truerealtimefactor, bool pause)
virtual void | changeShadowTechnique ()
| Changes the currently used shadow technique.
virtual void | base_close ()
| deletes the stuff that is created on makescene and the like
## Protected Attributes
dGeomID | ground
OsgHandle | osgHandle
OdeHandle | odeHandle
std::string | caption
std::string | title
std::string | groundTexture
osg::Group * | dummy
osg::Node * | hud
osgText::Text * | timestats
osgText::Text * | captionline
osgText::Text * | titleline
Primitive * | plane
HUDStatisticsManager * | hUDStatisticsManager
| this manager provides methods for displaying statistics on the graphical window!
int | ReceivesShadowTraversalMask
int | CastsShadowTraversalMask
int | shadowTexSize
bool | useNVidia

## Constructor & Destructor Documentation

Base | ( | const std::string & | caption = `"LpzRobots Simulator (Martius et al)"` | ) |

~Base | ( |  | ) | `[virtual]`

## Member Function Documentation

void base_close | ( |  | ) | `[protected, virtual]`

deletes the stuff that is created on makescene and the like

void changeShadowTechnique | ( |  | ) | `[protected, virtual]`

Changes the currently used shadow technique.

The switch is realized between: 0 - NoShadow 3 - ParallelSplitShadowMap 4 - SoftShadowMap 5 - ShadowMap (simple) Currently not supported by this function: 1 - ShadowVolume 2 - ShadowTextue

int contains | ( | char ** | list,
|  | int | len,
|  | const char * | str |
| ) |  |  | `[static]`

returns the index+1 if the list contains the given string or 0 if not

osg::Node * createHUD | ( | OsgScene * | scene,
|  | const OsgConfig & | config |
| ) |  |  | `[virtual]`

creates hud and is supposed to return the camera to it and adds the geode of the hud to the scene

void createHUDManager | ( | osg::Geode * | geode,
|  | osgText::Font * | font |
| ) |  |  | `[virtual]`

virtual osgShadow::ShadowedScene* createShadowedScene | ( | osg::Node * | sceneToShadow,
|  | osg::LightSource * | lightSource,
|  | int | shadowType |
| ) |  |  | `[virtual]`

Shadow types: 1 - ShadowVolume 2 - ShadowTextue 3 - ParallelSplitShadowMap 4 - SoftShadowMap 5 - ShadowMap.

HUDStatisticsManager * getHUDSM | ( |  | ) | `[virtual]`

Create HUDStatisticsManager and register it for being called back every step.

But do not display if the system is initialised with -nographics.

Returns:
  the actual HUDStatisticsManager

Node * makeGround | ( | const OsgConfig & | config | ) | `[virtual]`

void makeLights | ( | osg::Group * | node,
|  | const OsgConfig & | config |
| ) |  |  | `[virtual]`

adds light to the node

void makePhysicsScene | ( |  | ) | `[virtual]`

create the ground plane

void makeScene | ( | OsgScene * | scene,
|  | const OsgConfig & | config |
| ) |  |  | `[virtual]`

creates the base scene graph with world, sky and floor and shadow and HUD and stores it in scene

Node * makeSky | ( | const OsgConfig & | config | ) | `[virtual]`

void setCaption | ( | const std::string & | caption | ) | `[virtual]`

sets the cpation that is printed at the right of the status line

virtual void setGroundTexture | ( | const char * | filename | ) | `[inline, virtual]`

void setTimeStats | ( | double | time,
|  | double | realtimefactor,
|  | double | truerealtimefactor,
|  | bool | pause |
| ) |  |  | `[protected, virtual]`

void setTitle | ( | const std::string & | title | ) | `[virtual]`

sets the title that is printed in the center of the status line

## Member Data Documentation

std::string caption`[protected]`

osgText::Text* captionline`[protected]`

int CastsShadowTraversalMask`[protected]`

osg::Group* dummy`[protected]`

const int GRAPHICS_CALLBACKABLE = 2`[static]`

called each osg/draw step

dGeomID ground`[protected]`

std::string groundTexture`[protected]`

osg::Node* hud`[protected]`

HUDStatisticsManager* hUDStatisticsManager`[protected]`

this manager provides methods for displaying statistics on the graphical window!

OdeHandle odeHandle`[protected]`

Examples:
  template_sphererobot/main.cpp.

OsgHandle osgHandle`[protected]`

Examples:
  template_sphererobot/main.cpp.

const int PHYSICS_CALLBACKABLE = 1`[static]`

called each ode/physics step

Primitive* plane`[protected]`

int ReceivesShadowTraversalMask`[protected]`

int shadowTexSize`[protected]`

osgText::Text* timestats`[protected]`

std::string title`[protected]`

osgText::Text* titleline`[protected]`

bool useNVidia`[protected]`

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

- base.h
- base.cpp