#include <InputDevice.h>
Inheritance diagram for Engine::InputDevice:
Public Member Functions | |
InputDevice () | |
virtual | ~InputDevice () |
virtual int | get_acceleration ()=0 |
Get a number representing the acceleration or breaking. | |
virtual int | get_slide ()=0 |
Sideways force . | |
virtual int | get_steering ()=0 |
Stearing angle. | |
virtual void | poll () |
Poll for events, if necessary. | |
virtual void | set_scene (Scene &scene) |
virtual void | set_car (GameObjects::Car *car) |
std::set< InputDevice * >::iterator | get_handle () const |
Protected Member Functions | |
void | report (InputReport::ReportType type, int value=0) |
Make a report, then submit it the car and scene as required. | |
Protected Attributes | |
Scene * | scene |
GameObjects::Car * | car |
std::set< InputDevice * >::iterator | handler_reference |
This is where input device abstraction is done. Different types of InputDevices can be created that are subclasses of this class, then anything wishing to get input from any type of input device can use a consistant interface.
Definition at line 31 of file InputDevice.h.
Engine::InputDevice::InputDevice | ( | ) |
Definition at line 18 of file InputDevice.cpp.
Engine::InputDevice::~InputDevice | ( | ) | [virtual] |
Definition at line 25 of file InputDevice.cpp.
virtual int Engine::InputDevice::get_acceleration | ( | ) | [pure virtual] |
Get a number representing the acceleration or breaking.
Implemented in Engine::InputDeviceAI, Engine::InputDeviceJoystick, Engine::InputDeviceKeyboard, and Engine::InputDeviceReplay.
std::set< InputDevice * >::iterator Engine::InputDevice::get_handle | ( | ) | const |
Definition at line 40 of file InputDevice.cpp.
virtual int Engine::InputDevice::get_slide | ( | ) | [pure virtual] |
Sideways force .
Implemented in Engine::InputDeviceAI, Engine::InputDeviceJoystick, Engine::InputDeviceKeyboard, and Engine::InputDeviceReplay.
virtual int Engine::InputDevice::get_steering | ( | ) | [pure virtual] |
Stearing angle.
Implemented in Engine::InputDeviceAI, Engine::InputDeviceJoystick, Engine::InputDeviceKeyboard, and Engine::InputDeviceReplay.
virtual void Engine::InputDevice::poll | ( | ) | [inline, virtual] |
Poll for events, if necessary.
Reimplemented in Engine::InputDeviceAI, Engine::InputDeviceJoystick, and Engine::InputDeviceKeyboard.
Definition at line 57 of file InputDevice.h.
void Engine::InputDevice::report | ( | InputReport::ReportType | type, | |
int | value = 0 | |||
) | [protected] |
Make a report, then submit it the car and scene as required.
type | The classification of the event that occured. | |
value | The new value for steering, slide, and acceleration changed events. |
Definition at line 45 of file InputDevice.cpp.
void Engine::InputDevice::set_car | ( | GameObjects::Car * | car | ) | [virtual] |
Definition at line 35 of file InputDevice.cpp.
void Engine::InputDevice::set_scene | ( | Scene & | scene | ) | [virtual] |
Definition at line 30 of file InputDevice.cpp.
GameObjects::Car* Engine::InputDevice::car [protected] |
Definition at line 66 of file InputDevice.h.
std::set<InputDevice *>::iterator Engine::InputDevice::handler_reference [protected] |
Definition at line 67 of file InputDevice.h.
Scene* Engine::InputDevice::scene [protected] |
Definition at line 65 of file InputDevice.h.
Generated at Mon Sep 6 00:41:17 2010 by Doxygen version 1.4.7 for Racer version svn335.