Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OsgHandle Class Reference

Data structure for accessing the OpenSceneGraph. More...

#include <osghandle.h>

Collaboration diagram for OsgHandle:

Public Member Functions

 OsgHandle ()
 
 ~OsgHandle ()
 
void init ()
 initialization of the structure More...
 
void setup (int windowW, int windowH)
 set up robotcameramanager (must be called after init but before usage of the structure) More...
 
void close ()
 deletes all internal variables More...
 
OsgHandle changeColor (const Color &color) const
 returns a new osghandle with only the color changed More...
 
OsgHandle changeColor (double r, double g, double b, double a=1.0) const
 returns a new osghandle with only the color changed More...
 
OsgHandle changeAlpha (double alpha) const
 returns a new osghandle with only the alpha channel changed More...
 
OsgHandle changeColor (const std::string &name) const
 returns a new osghandle with only the color changed More...
 
OsgHandle changeColorDef (const std::string &name, const Color &defcolor) const
 like changeColor(string) but with a default color (defcolor) in case no color with the name exists More...
 
Color getColor (const std::string &name) const
 returns the color that corresponds to the name (name,id, or alias) in the colorschema. More...
 
OsgHandle changeColorSet (int color_set) const
 returns a new osghandle with a changed color (alias) set More...
 
void setColorSet (int color_set)
 modifies the used color set. Only applies to new set colors. More...
 
ColorSchemacolorSchema ()
 returns the color schema. More...
 
const ColorSchemacolorSchema () const
 

Public Attributes

bool drawBoundings
 decides whether to draw bounding boxes More...
 
Color color
 
OsgConfigcfg
 
OsgScenescene
 
osg::Group * parent
 

Detailed Description

Data structure for accessing the OpenSceneGraph.

Constructor & Destructor Documentation

OsgHandle ( )
~OsgHandle ( )

Member Function Documentation

OsgHandle changeAlpha ( double  alpha) const

returns a new osghandle with only the alpha channel changed

OsgHandle changeColor ( const Color color) const

returns a new osghandle with only the color changed

OsgHandle changeColor ( double  r,
double  g,
double  b,
double  a = 1.0 
) const

returns a new osghandle with only the color changed

OsgHandle changeColor ( const std::string &  name) const

returns a new osghandle with only the color changed

Parameters
namename,id, or alias of a color in the colorschema The current color_set is used
OsgHandle changeColorDef ( const std::string &  name,
const Color defcolor 
) const

like changeColor(string) but with a default color (defcolor) in case no color with the name exists

OsgHandle changeColorSet ( int  color_set) const

returns a new osghandle with a changed color (alias) set

void close ( )

deletes all internal variables

ColorSchema * colorSchema ( )

returns the color schema.

Use this to set/load colors and aliases Note, the color schema is shared among the osghandles

const ColorSchema * colorSchema ( ) const
Color getColor ( const std::string &  name) const

returns the color that corresponds to the name (name,id, or alias) in the colorschema.

The current color_set is used

void init ( )

initialization of the structure

void setColorSet ( int  color_set)

modifies the used color set. Only applies to new set colors.

void setup ( int  windowW,
int  windowH 
)

set up robotcameramanager (must be called after init but before usage of the structure)

Member Data Documentation

OsgConfig* cfg
Color color
bool drawBoundings

decides whether to draw bounding boxes

osg::Group* parent
OsgScene* scene

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