The Handler class initialises Ogre3d (graphics) and OIS (input) and derives their callbacks. Class shall simplify the examples.
More...
#include <Handler.hpp>
|
typedef blub::signal< void(blub::real)> | t_sigFrame |
|
typedef blub::signal< void(OIS::KeyEvent,
bool pressed)> | t_sigKeyGotPressed |
|
typedef blub::signal< void(bool
left)> | t_sigMouseGotPressed |
|
|
| Handler () |
| Handler constructor.
|
|
virtual | ~Handler () |
| ~Handler destructor.
|
|
bool | initialiseOgre () |
| initialiseOgre initialises ogre3d, including scene and camera. More...
|
|
bool | initialiseOIS () |
| initialiseOIS initialises OIS More...
|
|
bool | frameStarted (const Ogre::FrameEvent &evt) |
| frameStarted gets called after every rendered frame by ogre3d. Method calls the graphic dispatcher used by OgreTile and the signal signalFrame(). More...
|
|
bool | mouseMoved (const OIS::MouseEvent &arg) |
| mouseMoved gets called by OIS. Calculates the camera orientation and sets the results. More...
|
|
bool | mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID) |
| mousePressed Checks if mouse button "left" or "right" got pressed and calls the signal signalKeyGotPressed() More...
|
|
bool | mouseReleased (const OIS::MouseEvent &, OIS::MouseButtonID) |
| mouseReleased Does nothing. Must get implemented because pure virtual in OIS::KeyListener More...
|
|
bool | keyPressed (const OIS::KeyEvent &arg) |
| keyPressed gets calles by OIS. If key F11 got pressed rendering mode gets changed to wireframe. More...
|
|
bool | keyReleased (const OIS::KeyEvent &arg) |
| keyReleased Does nothing. Must get implemented because pure virtual in OIS::KeyListener More...
|
|
bool | handleKeyPress (const OIS::KeyEvent &arg, const bool &pressed) |
| handleKeyPress checks if WSAD or LShift gets pressed and moves the camera. More...
|
|
t_sigFrame * | signalFrame () |
|
t_sigKeyGotPressed * | signalKeyGotPressed () |
|
t_sigMouseGotPressed * | signalMouseGotPressed () |
|
|
blub::scopedPointer< Ogre::Root > | renderSystem |
|
Ogre::SceneManager * | renderScene |
|
Ogre::Camera * | camera |
|
OIS::InputManager * | inputManager |
|
OIS::Keyboard * | keyboard |
|
OIS::Mouse * | mouse |
|
blub::async::dispatcher | graphicDispatcher |
|
|
blub::real | m_lookVert |
|
blub::real | m_lookHor |
|
bool | m_forward |
|
bool | m_backwards |
|
bool | m_left |
|
bool | m_right |
|
bool | m_fast |
|
bool | m_lookLeft |
|
bool | m_lookRight |
|
bool | m_lookUp |
|
bool | m_lookDown |
|
t_sigFrame | m_sigFrame |
|
t_sigKeyGotPressed | m_sigKeyGotPressed |
|
t_sigMouseGotPressed | m_sigMouseGotPressed |
|
The Handler class initialises Ogre3d (graphics) and OIS (input) and derives their callbacks. Class shall simplify the examples.
- Examples:
- customVertexInformation.cpp, mesh.cpp, noise.cpp, and primitives.cpp.
bool Handler::frameStarted |
( |
const Ogre::FrameEvent & |
evt | ) |
|
|
inline |
frameStarted gets called after every rendered frame by ogre3d. Method calls the graphic dispatcher used by OgreTile and the signal signalFrame().
- Parameters
-
evt | Contains timeSinceLastFrame |
- Returns
- Returns false if render window got closed.
bool Handler::handleKeyPress |
( |
const OIS::KeyEvent & |
arg, |
|
|
const bool & |
pressed |
|
) |
| |
|
inline |
handleKeyPress checks if WSAD or LShift gets pressed and moves the camera.
- Parameters
-
- Returns
bool Handler::initialiseOgre |
( |
| ) |
|
|
inline |
bool Handler::initialiseOIS |
( |
| ) |
|
|
inline |
bool Handler::keyPressed |
( |
const OIS::KeyEvent & |
arg | ) |
|
|
inline |
keyPressed gets calles by OIS. If key F11 got pressed rendering mode gets changed to wireframe.
- Parameters
-
- Returns
bool Handler::keyReleased |
( |
const OIS::KeyEvent & |
arg | ) |
|
|
inline |
keyReleased Does nothing. Must get implemented because pure virtual in OIS::KeyListener
- Parameters
-
- Returns
bool Handler::mouseMoved |
( |
const OIS::MouseEvent & |
arg | ) |
|
|
inline |
mouseMoved gets called by OIS. Calculates the camera orientation and sets the results.
- Parameters
-
- Returns
bool Handler::mousePressed |
( |
const OIS::MouseEvent & |
arg, |
|
|
OIS::MouseButtonID |
|
|
) |
| |
|
inline |
mousePressed Checks if mouse button "left" or "right" got pressed and calls the signal signalKeyGotPressed()
- Parameters
-
- Returns
bool Handler::mouseReleased |
( |
const OIS::MouseEvent & |
, |
|
|
OIS::MouseButtonID |
|
|
) |
| |
|
inline |
mouseReleased Does nothing. Must get implemented because pure virtual in OIS::KeyListener
- Returns
The documentation for this class was generated from the following file:
- /home/mlanner/Development/cpp/projects/voxelTerrain/voxelTerrain/examples/voxelterrain/source/Handler.hpp