Key Handler Class, handles all of our KeyFunctions, which do not belong to camera control (this are handled by FPSCameraManipulator)
More...
#include <KeyHandler.h>
|
| KeyHandler (osg::Node *, osg::Camera *postProcessCam, std::vector< osg::ref_ptr< osg::Program >> programs) |
| Constructor. More...
|
|
virtual bool | handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa) |
|
Key Handler Class, handles all of our KeyFunctions, which do not belong to camera control (this are handled by FPSCameraManipulator)
- Controls:
C = Toggle WireFrame Mode On/Off
LClick = Interact
Shift+1 = Toggle programs
- Author
- Gleb Ostrowski
- Version
- 1.0
- Date
- 2014
- Copyright
- GNU Public License.
Definition at line 23 of file KeyHandler.h.
brtr::KeyHandler::KeyHandler |
( |
osg::Node * |
rootNode, |
|
|
osg::Camera * |
postProcessCam, |
|
|
std::vector< osg::ref_ptr< osg::Program >> |
programs |
|
) |
| |
Constructor.
- Parameters
-
rootnode | rootnode of the scene, polygonmode will be activatd on all children |
postProcessCam | node containing the postprocess programs |
programs | vector with postprocess programs |
Definition at line 8 of file KeyHandler.cpp.
brtr::KeyHandler::~KeyHandler |
( |
| ) |
|
|
protected |
bool brtr::KeyHandler::handle |
( |
const osgGA::GUIEventAdapter & |
ea, |
|
|
osgGA::GUIActionAdapter & |
aa |
|
) |
| |
|
virtual |
bool brtr::KeyHandler::handleKeyDown |
( |
const osgGA::GUIEventAdapter & |
ea, |
|
|
osgGA::GUIActionAdapter & |
aa |
|
) |
| |
|
private |
Shows the InteractionMessage on screen, if there is an InteractionObject beneath the mouse (e.a center of screen)
- Parameters
-
to | show or not show the text, that is the question |
- Returns
- the BaseInteractionCallback associated with the interactionObject, if any, null else;
Definition at line 101 of file KeyHandler.cpp.
void brtr::KeyHandler::mouseIntersection |
( |
osgGA::GUIActionAdapter & |
aa | ) |
|
|
private |
Checks, if under the mouse (e.a center of screen) is an interact-able object (e.a geometry)
- Parameters
-
aa | GUIActionAdapter for getting the camera , to whom the LineIntersectionVisitor will be attached to |
Definition at line 76 of file KeyHandler.cpp.
osg::ref_ptr<osg::Drawable> brtr::KeyHandler::_curDrawable |
|
private |
unsigned int brtr::KeyHandler::_curProg |
|
private |
bool brtr::KeyHandler::_isWireFrame |
|
private |
osg::ref_ptr< const osgGA::GUIEventAdapter > brtr::KeyHandler::_mouseEvent |
|
private |
osg::ref_ptr<osg::PolygonMode> brtr::KeyHandler::_normaleMode |
|
private |
osg::ref_ptr<osg::Camera> brtr::KeyHandler::_postProcessCam |
|
private |
std::vector<osg::ref_ptr<osg::Program> > brtr::KeyHandler::_programs |
|
private |
osg::ref_ptr<osg::Node> brtr::KeyHandler::_rootNode |
|
private |
osg::ref_ptr<osg::PolygonMode> brtr::KeyHandler::_wireFrameMode |
|
private |
The documentation for this class was generated from the following files: