Data structure for accessing the OpenSceneGraph. More...
#include <osghandle.h>
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. | |
ColorSchema * | colorSchema () |
returns the color schema. | |
const ColorSchema * | colorSchema () const |
Public Attributes | |
bool | drawBoundings |
decides whether to draw bounding boxes | |
Color | color |
OsgConfig * | cfg |
OsgScene * | scene |
osg::Group * | parent |
Data structure for accessing the OpenSceneGraph.
OsgHandle | ( | ) |
~OsgHandle | ( | ) |
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
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
returns a new osghandle with only the color changed
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)
bool drawBoundings |
decides whether to draw bounding boxes
osg::Group* parent |