SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
SLInputManager. manages system input and custom input devices. More...
#include <SLInputManager.h>
Public Member Functions | |
SLInputManager () | |
SLbool | pollAndProcessEvents (SLSceneView *sv) |
void | queueEvent (const SLInputEvent *e) |
SLVInputDevice & | devices () |
Private Member Functions | |
SLbool | processQueuedEvents (SLSceneView *sv) |
Private Attributes | |
SLQInputEvent | _systemEvents |
queue for known system events More... | |
SLVInputDevice | _devices |
list of activated SLInputDevices More... | |
Friends | |
class | SLInputDevice |
SLInputManager. manages system input and custom input devices.
One static instance of SLInputManager is used in AppCommon. Every user input has to go through the SLInputManager. System event's like touch, mouse, character input will be encapsulated in SLInputEvent subclasses and will be queued up before being sent to the relevant SLSceneView. Custom SLInputDevices can also be created. The SLInputDevices are guaranteed to receive a call to their poll() function whenever the SLInputManager requires them to send out new events. The method pollAndProcessEvents is called every frame in SLScene::onUpdate.
Definition at line 22 of file SLInputManager.h.
|
inline |
Definition at line 27 of file SLInputManager.h.
|
inline |
Definition at line 31 of file SLInputManager.h.
SLbool SLInputManager::pollAndProcessEvents | ( | SLSceneView * | sv | ) |
Sends any queued up system event's to their correct receiver and polls all activated SLInputDevices.
Definition at line 29 of file SLInputManager.cpp.
|
private |
Work off any queued up input event's and notify the correct receiver.
Definition at line 52 of file SLInputManager.cpp.
void SLInputManager::queueEvent | ( | const SLInputEvent * | e | ) |
Add a new SLInputEvent to the event queue. The queue will be emtied when a call to SLInputManager::pollEvents is made. The passed in SLInputEvents have to be dynamically allocated by the user, the deallocation is handled by the SLInputManager
Definition at line 45 of file SLInputManager.cpp.
|
friend |
Definition at line 24 of file SLInputManager.h.
|
private |
list of activated SLInputDevices
Definition at line 35 of file SLInputManager.h.
|
private |
queue for known system events
Definition at line 34 of file SLInputManager.h.