#include <OgreSDLInput.h>
Inheritance diagram for Ogre::SDLInput:
Public Methods | |
SDLInput () | |
virtual | ~SDLInput () |
void | initialise (RenderWindow *pWindow, bool useKeyboard=true, bool useMouse=true, bool useGameController=false) |
Initialise the input system. | |
void | capture () |
Captures the state of all the input devices. | |
bool | isKeyDown (KeyCode kc) const |
Determines if the specified key is currently depressed. | |
virtual long | getMouseRelX () const |
Retrieves the relative (compared to the last input poll) mouse movement on the X (horizontal) axis. | |
virtual long | getMouseRelY () const |
Retrieves the relative (compared to the last input poll) mouse movement on the Y (vertical) axis. | |
virtual long | getMouseRelZ () const |
Retrieves the relative (compared to the last input poll) mouse movement on the Z (mouse wheel) axis. | |
virtual long | getMouseAbsX () const |
Retrieves the absolute mouse position on the X (horizontal) axis. | |
virtual long | getMouseAbsY () const |
Retrieves the absolute mouse position on the Y (vertical) axis. | |
virtual long | getMouseAbsZ () const |
Retrieves the absolute mouse position on the Z (mouse wheel) axis. | |
virtual void | getMouseState (MouseState &state) const |
Retrieves the current state of the mouse. | |
virtual bool | getMouseButton (uchar button) const |
Retrieves the state of a mouse button. | |
void | useBufferedInput (EventQueue *pEventQueue, bool keys=true, bool mouse=true) |
Tells the reader to use buffered input and update the passed in queue. | |
virtual void | setBufferedInput (bool keys, bool mouse) |
virtual long | getMouseRelativeX () const |
Retrieves the relative position of the mouse when capture was called relative to the last time. | |
virtual long | getMouseRelativeY () const |
Retrieves the relative position of the mouse when capture was called relative to the last time. | |
virtual long | getMouseRelativeZ () const |
Retrieves the relative position of the mouse when capture was called relative to the last time. | |
void | addCursorMoveListener (MouseMotionListener *c) |
Adds a mouse motion listener to the cursor object. | |
void | removeCursorMoveListener (MouseMotionListener *c) |
Remove a mouse motion listener to the cursor object. | |
Static Public Methods | |
char | getKeyChar (int keyCode, long modifiers=0) |
Protected Methods | |
void | mouseMoved () |
Creates mouse moved or dragged events depending if any button is pressed. | |
void | createMouseEvent (int id, int button) |
Creates a MouseEvent that first gets processed by the cursor, then gets pushed on the queue. | |
void | triggerMouseButton (int nMouseCode, bool mousePressed) |
Creates mouse pressed, released, and clicked events. | |
void | createKeyEvent (int id, int key) |
void | keyChanged (int key, bool down) |
void | setupKeyChars () |
Protected Attributes | |
long | mModifiers |
The modifiers are a binary flags that represent what buttons are pressed, and what key modifiers are down (e.g. | |
Cursor * | mCursor |
Internal Cursor object. | |
EventQueue * | mEventQueue |
EventQueue is used for buffered input support. | |
bool | mUseBufferedKeys |
Wether to use buffering input support - buffering support relies on using an EventQueue. | |
bool | mUseBufferedMouse |
Wether to use buffering input support - buffering support relies on using an EventQueue. | |
MouseState | mMouseState |
The mouse state in immediate mode. | |
Static Protected Attributes | |
bool | sKeysInitialised = false |
Private Types | |
typedef std::map< SDLKey, KeyCode > | InputKeyMap |
Private Methods | |
void | processBufferedKeyboard () |
void | processBufferedMouse () |
Private Attributes | |
Uint8 * | mKeyboardBuffer |
int | mMaxKey |
int | mMouseX |
int | mMouseY |
int | mMouseRelativeX |
int | mMouseRelativeY |
int | mMouseRelativeZ |
Real | mScale |
Uint8 | mMouseKeys |
bool | _visible |
InputKeyMap | _key_map |
bool | warpMouse |
Static Private Attributes | |
const unsigned int | mWheelStep = 60 |
|
Definition at line 74 of file OgreSDLInput.h. |
|
|
Definition at line 143 of file OgreSDLInput.cpp. |
|
Adds a mouse motion listener to the cursor object. This keeps the Cursor object hidden. Definition at line 146 of file OgreInput.cpp. References Ogre::MouseMotionTarget::addMouseMotionListener(), and Ogre::InputReader::mCursor. Referenced by Ogre::EventProcessor::addCursorMoveListener(). |
|
Captures the state of all the input devices.
Implements Ogre::InputReader. Definition at line 166 of file OgreSDLInput.cpp. References _visible, Ogre::MouseState::Buttons, mKeyboardBuffer, mMouseKeys, mMouseRelativeX, mMouseRelativeY, mMouseRelativeZ, Ogre::InputReader::mMouseState, mMouseX, mMouseY, Ogre::InputReader::mUseBufferedKeys, Ogre::InputReader::mUseBufferedMouse, mWheelStep, processBufferedKeyboard(), processBufferedMouse(), Ogre::MouseState::Xabs, Ogre::MouseState::Xrel, Ogre::MouseState::Yabs, Ogre::MouseState::Yrel, Ogre::MouseState::Zabs, and Ogre::MouseState::Zrel. |
|
Definition at line 123 of file OgreInput.cpp. References Ogre::InputReader::mEventQueue, Ogre::InputReader::mModifiers, and Ogre::EventQueue::push(). Referenced by Ogre::InputReader::keyChanged(). |
|
Creates a MouseEvent that first gets processed by the cursor, then gets pushed on the queue.
Definition at line 104 of file OgreInput.cpp. References Ogre::Cursor::getRelX(), Ogre::Cursor::getRelY(), Ogre::Cursor::getRelZ(), Ogre::Cursor::getX(), Ogre::Cursor::getY(), Ogre::Cursor::getZ(), Ogre::InputReader::mCursor, Ogre::InputReader::mEventQueue, Ogre::InputReader::mModifiers, Ogre::Cursor::processEvent(), and Ogre::EventQueue::push(). Referenced by Ogre::InputReader::mouseMoved(), and Ogre::InputReader::triggerMouseButton(). |
|
Definition at line 205 of file OgreInput.cpp. References Ogre::KEYCODE(), and Ogre::sKeyChars. |
|
Retrieves the absolute mouse position on the X (horizontal) axis.
Implements Ogre::InputReader. Definition at line 540 of file OgreSDLInput.cpp. References mMouseX. |
|
Retrieves the absolute mouse position on the Y (vertical) axis.
Implements Ogre::InputReader. Definition at line 545 of file OgreSDLInput.cpp. References mMouseY. |
|
Retrieves the absolute mouse position on the Z (mouse wheel) axis.
Implements Ogre::InputReader. Definition at line 550 of file OgreSDLInput.cpp. |
|
Retrieves the state of a mouse button.
Implements Ogre::InputReader. Definition at line 555 of file OgreSDLInput.cpp. References Ogre::MouseState::isButtonDown(), Ogre::InputReader::mMouseState, and Ogre::uchar. |
|
Retrieves the relative position of the mouse when capture was called relative to the last time.
Reimplemented in Ogre::Win32Input. Definition at line 272 of file OgreInput.h. |
|
Retrieves the relative position of the mouse when capture was called relative to the last time.
Reimplemented in Ogre::Win32Input. Definition at line 276 of file OgreInput.h. |
|
Retrieves the relative position of the mouse when capture was called relative to the last time.
Definition at line 280 of file OgreInput.h. |
|
Retrieves the relative (compared to the last input poll) mouse movement on the X (horizontal) axis.
Implements Ogre::InputReader. Definition at line 525 of file OgreSDLInput.cpp. References Ogre::InputReader::mMouseState, and Ogre::MouseState::Xrel. |
|
Retrieves the relative (compared to the last input poll) mouse movement on the Y (vertical) axis.
Implements Ogre::InputReader. Definition at line 530 of file OgreSDLInput.cpp. References Ogre::InputReader::mMouseState, and Ogre::MouseState::Yrel. |
|
Retrieves the relative (compared to the last input poll) mouse movement on the Z (mouse wheel) axis.
Implements Ogre::InputReader. Definition at line 535 of file OgreSDLInput.cpp. References Ogre::InputReader::mMouseState, and Ogre::MouseState::Zrel. |
|
Retrieves the current state of the mouse.
Implements Ogre::InputReader. Definition at line 669 of file OgreSDLInput.cpp. References Ogre::InputReader::mMouseState. |
|
Initialise the input system.
Implements Ogre::InputReader. Definition at line 149 of file OgreSDLInput.cpp. References Ogre::RenderWindow::getMetrics(), mMouseX, and mMouseY. |
|
|
Definition at line 157 of file OgreInput.cpp. References Ogre::InputReader::createKeyEvent(), Ogre::KC_LCONTROL, Ogre::KC_LMENU, Ogre::KC_LSHIFT, Ogre::KC_RCONTROL, Ogre::KC_RMENU, Ogre::KC_RSHIFT, and Ogre::InputReader::mModifiers. Referenced by processBufferedKeyboard(), and Ogre::Win32Input8::readBufferedKeyboardData(). |
|
Creates mouse moved or dragged events depending if any button is pressed.
Definition at line 132 of file OgreInput.cpp. References Ogre::InputReader::createMouseEvent(), and Ogre::InputReader::mModifiers. Referenced by processBufferedMouse(), and Ogre::Win32Input8::readBufferedMouseData(). |
|
Definition at line 560 of file OgreSDLInput.cpp. References _key_map, and Ogre::InputReader::keyChanged(). Referenced by capture(). |
|
Definition at line 581 of file OgreSDLInput.cpp. References _visible, Ogre::Cursor::addToX(), Ogre::Cursor::addToY(), Ogre::InputReader::mCursor, mMouseRelativeZ, Ogre::InputReader::mouseMoved(), mScale, mWheelStep, and Ogre::InputReader::triggerMouseButton(). Referenced by capture(). |
|
Remove a mouse motion listener to the cursor object. This keeps the Cursor object hidden. Definition at line 151 of file OgreInput.cpp. References Ogre::InputReader::mCursor, and Ogre::MouseMotionTarget::removeMouseMotionListener(). Referenced by Ogre::EventProcessor::removeCursorMoveListener(). |
|
Reimplemented in Ogre::Win32Input8. Definition at line 70 of file OgreInput.cpp. References Ogre::InputReader::mUseBufferedKeys, and Ogre::InputReader::mUseBufferedMouse. |
|
|
Creates mouse pressed, released, and clicked events.
Definition at line 87 of file OgreInput.cpp. References Ogre::InputReader::createMouseEvent(), and Ogre::InputReader::mModifiers. Referenced by processBufferedMouse(), and Ogre::Win32Input8::readBufferedMouseData(). |
|
Tells the reader to use buffered input and update the passed in queue.
Definition at line 53 of file OgreInput.cpp. References Ogre::InputReader::mCursor, Ogre::InputReader::mEventQueue, Ogre::InputReader::mUseBufferedKeys, and Ogre::InputReader::mUseBufferedMouse. Referenced by Ogre::EventProcessor::initialise(). |
|
Definition at line 75 of file OgreSDLInput.h. Referenced by processBufferedKeyboard(), and SDLInput(). |
|
Definition at line 73 of file OgreSDLInput.h. Referenced by capture(), and processBufferedMouse(). |
|
Internal Cursor object.
Definition at line 331 of file OgreInput.h. Referenced by Ogre::InputReader::addCursorMoveListener(), Ogre::InputReader::createMouseEvent(), Ogre::InputReader::InputReader(), processBufferedMouse(), Ogre::Win32Input8::readBufferedMouseData(), Ogre::InputReader::removeCursorMoveListener(), Ogre::InputReader::useBufferedInput(), and Ogre::InputReader::~InputReader(). |
|
EventQueue is used for buffered input support.
Definition at line 334 of file OgreInput.h. Referenced by Ogre::InputReader::createKeyEvent(), Ogre::InputReader::createMouseEvent(), Ogre::InputReader::InputReader(), SDLInput(), Ogre::InputReader::useBufferedInput(), and Ogre::Win32Input8::Win32Input8(). |
|
Definition at line 67 of file OgreSDLInput.h. |
|
Definition at line 68 of file OgreSDLInput.h. |
|
The modifiers are a binary flags that represent what buttons are pressed, and what key modifiers are down (e.g. shift/alt). Definition at line 321 of file OgreInput.h. Referenced by Ogre::Win32Input8::capture(), Ogre::InputReader::createKeyEvent(), Ogre::InputReader::createMouseEvent(), Ogre::Win32Input8::getKeyModifiers(), Ogre::InputReader::InputReader(), Ogre::InputReader::keyChanged(), Ogre::InputReader::mouseMoved(), and Ogre::InputReader::triggerMouseButton(). |
|
Definition at line 72 of file OgreSDLInput.h. Referenced by capture(). |
|
Definition at line 70 of file OgreSDLInput.h. Referenced by capture(). |
|
Definition at line 70 of file OgreSDLInput.h. Referenced by capture(). |
|
Definition at line 70 of file OgreSDLInput.h. Referenced by capture(), and processBufferedMouse(). |
|
The mouse state in immediate mode.
Definition at line 342 of file OgreInput.h. Referenced by capture(), Ogre::Win32Input8::captureMouse(), Ogre::Win32Input8::getMouseAbsX(), Ogre::Win32Input8::getMouseAbsY(), Ogre::Win32Input8::getMouseAbsZ(), Ogre::Win32Input8::getMouseButton(), getMouseButton(), Ogre::Win32Input8::getMouseRelX(), getMouseRelX(), Ogre::Win32Input8::getMouseRelY(), getMouseRelY(), Ogre::Win32Input8::getMouseRelZ(), getMouseRelZ(), Ogre::Win32Input8::getMouseState(), getMouseState(), and Ogre::Win32Input8::initialiseImmediateMouse(). |
|
Definition at line 69 of file OgreSDLInput.h. Referenced by capture(), getMouseAbsX(), and initialise(). |
|
Definition at line 69 of file OgreSDLInput.h. Referenced by capture(), getMouseAbsY(), and initialise(). |
|
Definition at line 71 of file OgreSDLInput.h. Referenced by processBufferedMouse(). |
|
Wether to use buffering input support - buffering support relies on using an EventQueue.
Definition at line 339 of file OgreInput.h. Referenced by capture(), Ogre::InputReader::InputReader(), Ogre::Win32Input8::setBufferedInput(), Ogre::InputReader::setBufferedInput(), and Ogre::InputReader::useBufferedInput(). |
|
Wether to use buffering input support - buffering support relies on using an EventQueue.
Definition at line 339 of file OgreInput.h. Referenced by capture(), Ogre::InputReader::InputReader(), Ogre::Win32Input8::setBufferedInput(), Ogre::InputReader::setBufferedInput(), and Ogre::InputReader::useBufferedInput(). |
|
Definition at line 78 of file OgreSDLInput.h. Referenced by capture(), and processBufferedMouse(). |
|
Definition at line 36 of file OgreInput.cpp. Referenced by Ogre::InputReader::InputReader(). |
|
Definition at line 76 of file OgreSDLInput.h. |
Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:25:15 2004