SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLInputDevice.h
Go to the documentation of this file.
1
/**
2
* \file SLInputDevice.h
3
* \date January 2015
4
* \authors Marc Wacker, Marcus Hudritsch
5
* \copyright http://opensource.org/licenses/GPL-3.0
6
* \remarks Please use clangformat to format the code. See more code style on
7
* https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
8
*/
9
10
#ifndef SLINPUTDEVICE_H
11
#define SLINPUTDEVICE_H
12
13
#include <
SL.h
>
14
#include <vector>
15
16
class
SLInputManager
;
17
18
//-----------------------------------------------------------------------------
19
//! Interface for input devices that have to be pollsed
20
class
SLInputDevice
21
{
22
public
:
23
explicit
SLInputDevice
(
SLInputManager
& inputManager);
24
virtual
~SLInputDevice
();
25
26
void
enable
();
27
void
disable
();
28
29
/** Polls a custom input device. returns true if the poll resulted in
30
event's being sent out that were accepted by some receiver. */
31
virtual
SLbool
poll
() = 0;
32
33
private
:
34
SLInputManager
&
_inputManager
;
35
};
36
//-----------------------------------------------------------------------------
37
typedef
vector<SLInputDevice*>
SLVInputDevice
;
38
//-----------------------------------------------------------------------------
39
#endif
SL.h
SLbool
bool SLbool
Definition:
SL.h:175
SLVInputDevice
vector< SLInputDevice * > SLVInputDevice
Definition:
SLInputDevice.h:37
SLInputDevice
Interface for input devices that have to be pollsed.
Definition:
SLInputDevice.h:21
SLInputDevice::_inputManager
SLInputManager & _inputManager
Definition:
SLInputDevice.h:34
SLInputDevice::enable
void enable()
Definition:
SLInputDevice.cpp:34
SLInputDevice::poll
virtual SLbool poll()=0
SLInputDevice::SLInputDevice
SLInputDevice(SLInputManager &inputManager)
Definition:
SLInputDevice.cpp:17
SLInputDevice::~SLInputDevice
virtual ~SLInputDevice()
Definition:
SLInputDevice.cpp:26
SLInputDevice::disable
void disable()
Definition:
SLInputDevice.cpp:42
SLInputManager
SLInputManager. manages system input and custom input devices.
Definition:
SLInputManager.h:23
modules
sl
source
input
SLInputDevice.h
Generated by
1.9.1