BrainTrain
 All Classes Namespaces Files Functions Variables Macros Pages
brtr::AddPortalGunInteractionCallback Class Reference

InteractionCallback for adding the portal gun to the players inventar. More...

#include <AddPortalGunInteractionCallback.h>

Inheritance diagram for brtr::AddPortalGunInteractionCallback:
brtr::BaseInteractionCallback

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...
 
- Public Member Functions inherited from brtr::BaseInteractionCallback
 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

- Protected Attributes inherited from brtr::BaseInteractionCallback
osg::ref_ptr< osg::Node > _attachTo
 
osg::ref_ptr< osg::Camera > _hudCam
 
bool _done
 
osg::ref_ptr< osgText::Text > _text
 

Detailed Description

InteractionCallback for adding the portal gun to the players inventar.

Author
Gleb Ostrowski
Version
1.0
Date
2014

Definition at line 14 of file AddPortalGunInteractionCallback.h.

Constructor & Destructor Documentation

brtr::AddPortalGunInteractionCallback::AddPortalGunInteractionCallback ( osg::Node *  weaponHUD,
osg::Camera *  hudCam,
osg::Switch *  switcher,
int  width,
int  height 
)

Constructor.

Parameters
weaponHUDweaponHUD which provides the method to add the portalgun to it
hudCam
switcherswitch-node which contains the portalGun object, will be switched to off upon interaction, removing the portal Gun from the world
widthscreenWidth
heightscreenHeight
Returns

Definition at line 5 of file AddPortalGunInteractionCallback.cpp.

Member Function Documentation

void brtr::AddPortalGunInteractionCallback::interact ( osg::Node *  ,
osg::NodeVisitor *   
)
protectedvirtual

the interaction logic must be implemented be the children in this method

Implements brtr::BaseInteractionCallback.

Definition at line 13 of file AddPortalGunInteractionCallback.cpp.

void brtr::AddPortalGunInteractionCallback::setText ( )
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.

Member Data Documentation

osg::ref_ptr<osg::Switch> brtr::AddPortalGunInteractionCallback::_switcher
private

Definition at line 32 of file AddPortalGunInteractionCallback.h.


The documentation for this class was generated from the following files: