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
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:
35 };
36 //-----------------------------------------------------------------------------
37 typedef vector<SLInputDevice*> SLVInputDevice;
38 //-----------------------------------------------------------------------------
39 #endif
bool SLbool
Definition: SL.h:175
vector< SLInputDevice * > SLVInputDevice
Definition: SLInputDevice.h:37
Interface for input devices that have to be pollsed.
Definition: SLInputDevice.h:21
SLInputManager & _inputManager
Definition: SLInputDevice.h:34
virtual SLbool poll()=0
SLInputDevice(SLInputManager &inputManager)
virtual ~SLInputDevice()
SLInputManager. manages system input and custom input devices.