BrainTrain
|
InteractionCallback for adding the portal gun to the players inventar. More...
#include <AddPortalGunInteractionCallback.h>
Public Member Functions | |
AddPortalGunInteractionCallback (osg::Node *weaponHUD, osg::Camera *hudCam, osg::Switch *switcher, int width, int height) | |
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 *) |
the interaction logic must be implemented be the children in this method More... | |
Private Attributes | |
osg::ref_ptr< osg::Switch > | _switcher |
Additional Inherited Members | |
![]() | |
osg::ref_ptr< osg::Node > | _attachTo |
osg::ref_ptr< osg::Camera > | _hudCam |
bool | _done |
osg::ref_ptr< osgText::Text > | _text |
InteractionCallback for adding the portal gun to the players inventar.
Definition at line 14 of file AddPortalGunInteractionCallback.h.
brtr::AddPortalGunInteractionCallback::AddPortalGunInteractionCallback | ( | osg::Node * | weaponHUD, |
osg::Camera * | hudCam, | ||
osg::Switch * | switcher, | ||
int | width, | ||
int | height | ||
) |
Constructor.
weaponHUD | weaponHUD which provides the method to add the portalgun to it |
hudCam | |
switcher | switch-node which contains the portalGun object, will be switched to off upon interaction, removing the portal Gun from the world |
width | screenWidth |
height | screenHeight |
Definition at line 5 of file AddPortalGunInteractionCallback.cpp.
|
protectedvirtual |
the interaction logic must be implemented be the children in this method
Implements brtr::BaseInteractionCallback.
Definition at line 13 of file AddPortalGunInteractionCallback.cpp.
|
virtual |
sets the text on screen. Subclasses must override to set its own (info)text
Implements brtr::BaseInteractionCallback.
Definition at line 9 of file AddPortalGunInteractionCallback.cpp.
|
private |
Definition at line 32 of file AddPortalGunInteractionCallback.h.