OsgHandle Class Reference

Data structure for accessing the OpenSceneGraph. More...

#include <osghandle.h>

Collaboration diagram for OsgHandle:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 OsgHandle ()
 ~OsgHandle ()
void init ()
 initialization of the structure
void setup (int windowW, int windowH)
 set up robotcameramanager (must be called after init but before usage of the structure)
void close ()
 deletes all internal variables
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 changeAlpha (double alpha) const
 returns a new osghandle with only the alpha channel changed
OsgHandle changeColor (const std::string &name) const
 returns a new osghandle with only the color changed
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
Color getColor (const std::string &name) const
 returns the color that corresponds to the name (name,id, or alias) in the colorschema.
OsgHandle changeColorSet (int color_set) const
 returns a new osghandle with a changed color (alias) set
void setColorSet (int color_set)
 modifies the used color set. Only applies to new set colors.
ColorSchemacolorSchema ()
 returns the color schema.
const ColorSchemacolorSchema () const

Public Attributes

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

Detailed Description

Data structure for accessing the OpenSceneGraph.

Examples:

template_sphererobot/main.cpp.


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 std::string &  name  )  const

returns a new osghandle with only the color changed

Parameters:
name name,id, or alias of a color in the colorschema The current color_set is used
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 Color color  )  const

returns a new osghandle with only the color changed

Examples:
template_sphererobot/main.cpp.
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

const ColorSchema * colorSchema (  )  const
ColorSchema * colorSchema (  ) 

returns the color schema.

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

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

decides whether to draw bounding boxes

osg::Group* parent

The documentation for this class was generated from the following files:
Generated on Thu Jun 28 14:49:07 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3