BrainTrain
|
Callback for switching the ToonTextures. More...
#include <ToonTexSwitcherCallback.h>
Public Member Functions | |
ToonTexSwitcherCallback (osg::Node *scenedata, osg::Camera *hudCam, int width, int height, std::vector< osg::ref_ptr< osg::Texture2D >> toonTexs) | |
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 *node, osg::NodeVisitor *) |
each interact sets the next texture More... | |
Private Attributes | |
int | _curTex |
std::vector< osg::ref_ptr < osg::Texture2D > > | _toonTexs |
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 ToonTextures.
Every click the next texture in the vector is choosen scenedata is the node which stateset holds the textures
Definition at line 17 of file ToonTexSwitcherCallback.h.
brtr::ToonTexSwitcherCallback::ToonTexSwitcherCallback | ( | osg::Node * | scenedata, |
osg::Camera * | hudCam, | ||
int | width, | ||
int | height, | ||
std::vector< osg::ref_ptr< osg::Texture2D >> | toonTexs | ||
) |
Constructor.
scenedata | node which stateset contains the ToonTextures |
hudCam | |
width | screenWidth |
height | screenHeight |
toonTexs | vector with ToonTextures |
Definition at line 9 of file ToonTexSwitcherCallback.cpp.
|
protectedvirtual |
each interact sets the next texture
not | used |
not | used |
Implements brtr::BaseInteractionCallback.
Definition at line 18 of file ToonTexSwitcherCallback.cpp.
|
virtual |
sets the text on screen. Subclasses must override to set its own (info)text
Implements brtr::BaseInteractionCallback.
Definition at line 14 of file ToonTexSwitcherCallback.cpp.
|
private |
Definition at line 40 of file ToonTexSwitcherCallback.h.
|
private |
Definition at line 41 of file ToonTexSwitcherCallback.h.