BrainTrain
|
Callback for switching the postprocess programs. More...
#include <ProgramSwitcherCallback.h>
Public Member Functions | |
ProgramSwitcherCallback (osg::Node *postprocessCam, osg::Camera *hudCam, int width, int height, std::vector< osg::ref_ptr< osg::Program >> programs) | |
Constructor. More... | |
virtual void | setText () |
sets the text on screen. Subclasses must override to set its own (info)text More... | |
![]() | |
BaseInteractionCallback (osg::Node *attachTo, osg::Camera *hudCam, int width, int height) | |
Constructor. More... | |
virtual void | operator() (osg::Node *node, osg::NodeVisitor *nv) |
void | clearText () |
void | reactivate () |
osg::ref_ptr< osg::Node > | getNode () const |
void | setNode (osg::ref_ptr< osg::Node > val) |
Protected Member Functions | |
virtual void | interact (osg::Node *, osg::NodeVisitor *) |
each interact sets the next program More... | |
Private Attributes | |
std::vector< osg::ref_ptr < osg::Program > > | _programs |
unsigned int | _curProg |
Additional Inherited Members | |
![]() | |
osg::ref_ptr< osg::Node > | _attachTo |
osg::ref_ptr< osg::Camera > | _hudCam |
bool | _done |
osg::ref_ptr< osgText::Text > | _text |
Callback for switching the postprocess programs.
Every click the next program in the vector is choosen postprocessCam is the node which stateset holds the programs
Definition at line 17 of file ProgramSwitcherCallback.h.
brtr::ProgramSwitcherCallback::ProgramSwitcherCallback | ( | osg::Node * | postprocessCam, |
osg::Camera * | hudCam, | ||
int | width, | ||
int | height, | ||
std::vector< osg::ref_ptr< osg::Program >> | programs | ||
) |
Constructor.
postprocessCam | node which stateset contains the programs |
hudCam | |
width | screenWidth |
height | screenHeight |
programs | vector with postProcessprograms |
Definition at line 8 of file ProgramSwitcherCallback.cpp.
|
protectedvirtual |
each interact sets the next program
not | used |
not | used |
Implements brtr::BaseInteractionCallback.
Definition at line 17 of file ProgramSwitcherCallback.cpp.
|
virtual |
sets the text on screen. Subclasses must override to set its own (info)text
Implements brtr::BaseInteractionCallback.
Definition at line 13 of file ProgramSwitcherCallback.cpp.
|
private |
Definition at line 41 of file ProgramSwitcherCallback.h.
|
private |
Definition at line 40 of file ProgramSwitcherCallback.h.