#include <OgreWin32Input.h>
Inheritance diagram for Ogre::Win32Input:
Public Methods | |
Win32Input () | |
~Win32Input () | |
void | initialise (RenderWindow *pWindow, bool useKeyboard=true, bool useMouse=true, bool useGameController=false) |
Initialise the input system. More... | |
void | capture (void) |
Captures the state of all the input devices. More... | |
bool | isKeyDown (KeyCode kc) |
Determines if the specified key is currently depressed. More... | |
int | getMouseRelativeX (void) |
Retrieves the relative position of the mouse when capture was called relative to the last time. More... | |
int | getMouseRelativeY (void) |
Retrieves the relative position of the mouse when capture was called relative to the last time. More... | |
void | useBufferedInput (EventQueue *pEventQueue) |
Tells the reader to use buffered input and update the passed in queue. More... | |
virtual bool | isKeyDown (KeyCode kc) const=0 |
Determines if the specified key is currently depressed. More... | |
virtual long | getMouseRelativeX () const |
Retrieves the relative position of the mouse when capture was called relative to the last time. More... | |
virtual long | getMouseRelativeY () const |
Retrieves the relative position of the mouse when capture was called relative to the last time. More... | |
virtual long | getMouseRelativeZ () const |
Retrieves the relative position of the mouse when capture was called relative to the last time. More... | |
virtual long | getMouseRelX () const=0 |
Retrieves the relative (compared to the last input poll) mouse movement on the X (horizontal) axis. More... | |
virtual long | getMouseRelY () const=0 |
Retrieves the relative (compared to the last input poll) mouse movement on the Y (vertical) axis. More... | |
virtual long | getMouseRelZ () const=0 |
Retrieves the relative (compared to the last input poll) mouse movement on the Z (mouse wheel) axis. More... | |
virtual long | getMouseAbsX () const=0 |
Retrieves the absolute mouse position on the X (horizontal) axis. More... | |
virtual long | getMouseAbsY () const=0 |
Retrieves the absolute mouse position on the Y (vertical) axis. More... | |
virtual long | getMouseAbsZ () const=0 |
Retrieves the absolute mouse position on the Z (mouse wheel) axis. More... | |
virtual void | getMouseState (MouseState &state) const=0 |
Retrieves the current state of the mouse. More... | |
virtual bool | getMouseButton (uchar button) const=0 |
Retrieves the state of a mouse button. More... | |
void | addCursorMoveListener (MouseMotionListener *c) |
Adds a mouse motion listener to the cursor object. More... | |
void | removeCursorMoveListener (MouseMotionListener *c) |
Remove a mouse motion listener to the cursor object. More... | |
Protected Methods | |
void | mouseMoved () |
Creates mouse moved or dragged events depending if any button is pressed. More... | |
void | createMouseEvent (int id, int button) |
Creates a MouseEvent that first gets processed by the cursor, then gets pushed on the queue. More... | |
void | triggerMouseButton (int nMouseCode, bool mousePressed) |
Creates mouse pressed, released, and clicked events. More... | |
Protected Attributes | |
long | mModifiers |
The modifiers are a binary flags that represent what buttons are pressed, and what key modifiers are down (e.g. More... | |
Cursor * | mCursor |
Internal Cursor object. More... | |
EventQueue * | mEventQueue |
EventQueue is used for buffered input support. More... | |
bool | mUseBuffered |
Wether to use buffering input support - buffering support relies on using an EventQueue. More... | |
MouseState | mMouseState |
The mouse state in immediate mode. More... | |
Private Attributes | |
LPDIRECTINPUT7 | mlpDI |
LPDIRECTINPUTDEVICE7 | mlpDIKeyboard |
LPDIRECTINPUTDEVICE7 | mlpDIMouse |
HWND | mHWnd |
char | mKeyboardBuffer [256] |
int | mMouseX |
int | mMouseY |
int | mMouseCenterX |
int | mMouseCenterY |
bool | mLMBDown |
bool | mRMBDown |
Note that this is a basic implementation only at the moment.
|
|
|
|
|
Adds a mouse motion listener to the cursor object. This keeps the Cursor object hidden. |
|
Captures the state of all the input devices. This method captures the state of all input devices and stores it internally for use when the enquiry methods are next called. This is done to ensure that all input is captured at once and therefore combinations of input are not subject to time differences when methods are called. Implements Ogre::InputReader. |
|
Creates a MouseEvent that first gets processed by the cursor, then gets pushed on the queue.
|
|
Retrieves the absolute mouse position on the X (horizontal) axis.
Implemented in Ogre::SDLInput. |
|
Retrieves the absolute mouse position on the Y (vertical) axis.
Implemented in Ogre::SDLInput. |
|
Retrieves the absolute mouse position on the Z (mouse wheel) axis.
Implemented in Ogre::SDLInput. |
|
Retrieves the state of a mouse button.
Implemented in Ogre::SDLInput. |
|
Retrieves the relative position of the mouse when capture was called relative to the last time.
Reimplemented in Ogre::Win32Input. |
|
Retrieves the relative position of the mouse when capture was called relative to the last time.
Reimplemented from Ogre::InputReader. |
|
Retrieves the relative position of the mouse when capture was called relative to the last time.
Reimplemented in Ogre::Win32Input. |
|
Retrieves the relative position of the mouse when capture was called relative to the last time.
Reimplemented from Ogre::InputReader. |
|
Retrieves the relative position of the mouse when capture was called relative to the last time.
|
|
Retrieves the relative (compared to the last input poll) mouse movement on the X (horizontal) axis.
Implemented in Ogre::SDLInput. |
|
Retrieves the relative (compared to the last input poll) mouse movement on the Y (vertical) axis.
Implemented in Ogre::SDLInput. |
|
Retrieves the relative (compared to the last input poll) mouse movement on the Z (mouse wheel) axis.
Implemented in Ogre::SDLInput. |
|
Retrieves the current state of the mouse.
Implemented in Ogre::SDLInput. |
|
Initialise the input system.
Implements Ogre::InputReader. |
|
Determines if the specified key is currently depressed.
Implemented in Ogre::SDLInput. |
|
Determines if the specified key is currently depressed. Note that this enquiry method uses the state of the keyboard at the last 'capture' call. |
|
Creates mouse moved or dragged events depending if any button is pressed.
|
|
Remove a mouse motion listener to the cursor object. This keeps the Cursor object hidden. |
|
Creates mouse pressed, released, and clicked events.
|
|
Tells the reader to use buffered input and update the passed in queue.
|
|
Internal Cursor object.
|
|
EventQueue is used for buffered input support.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The modifiers are a binary flags that represent what buttons are pressed, and what key modifiers are down (e.g. shift/alt). |
|
|
|
|
|
The mouse state in immediate mode.
|
|
|
|
|
|
|
|
Wether to use buffering input support - buffering support relies on using an EventQueue.
|
Copyright © 2002 by The OGRE Team