syBR::InputOIS::MouseHandler Class Reference

Base mouse handler class. More...

#include <MouseHandler.hpp>

Inheritance diagram for syBR::InputOIS::MouseHandler:

syBR::InputCore::MouseHandler

List of all members.

Public Member Functions

 MouseHandler (OIS::Mouse *pMouse)
 Constructor.
virtual ~MouseHandler ()
 Destructor.
bool isButtonDown (InputCore::MouseButton button)
 Check if a button is down.
const int getMousePosition (const unsigned int axis, const bool relative) const
 Get the position of the mouse along an axis.

Private Attributes

OIS::Mouse * m_pMouse
 OIS mouse.

Static Private Attributes

static const
OIS::MouseButtonID 
sm_mouseButtons []
 Relationship between the InputCore mouse buttons and OIS mouse buttons.

Friends

class InputSystem


Detailed Description

Base mouse handler class.

This is the object which gives access to the mouse. This is a pure abstract class which needs a concrete implementation (using OIS, DirectInput or any other input library).


Constructor & Destructor Documentation

syBR::InputOIS::MouseHandler::MouseHandler ( OIS::Mouse *  pMouse  ) 

Constructor.

syBR::InputOIS::MouseHandler::~MouseHandler (  )  [virtual]

Destructor.

Reimplemented from syBR::InputCore::MouseHandler.


Member Function Documentation

bool syBR::InputOIS::MouseHandler::isButtonDown ( InputCore::MouseButton  button  )  [virtual]

Check if a button is down.

Parameters:
button Button to be checked
Returns:
One of these:
  • true if the button is currently down
  • false otherwise

Implements syBR::InputCore::MouseHandler.

const int syBR::InputOIS::MouseHandler::getMousePosition ( const unsigned int  axis,
const bool  relative 
) const [virtual]

Get the position of the mouse along an axis.

Parameters:
axis 0 for x-axis, 1 for y-axis and 2 for z-axis (wheel)
relative One of these:
  • true to return the position relative to the last kwown position
  • false to return the absolute position
Returns:
Position of the mouse along the specified axis

Implements syBR::InputCore::MouseHandler.


Friends And Related Function Documentation

friend class InputSystem [friend]


Member Data Documentation

const OIS::MouseButtonID syBR::InputOIS::MouseHandler::sm_mouseButtons [static, private]

Initial value:

  {
    OIS::MB_Left,
    OIS::MB_Right,
    OIS::MB_Middle,
    OIS::MB_Button3,
    OIS::MB_Button4,
    OIS::MB_Button5,
    OIS::MB_Button6,
    OIS::MB_Button7
  }
Relationship between the InputCore mouse buttons and OIS mouse buttons.

OIS::Mouse* syBR::InputOIS::MouseHandler::m_pMouse [private]

OIS mouse.


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

Copyright © 2008 by Sebastien Frippiat
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008