SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
c
d
e
f
h
i
k
l
m
n
r
s
t
Properties
Related Functions
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Functions
b
c
e
f
g
i
j
m
o
p
r
s
t
u
v
w
y
Variables
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
v
w
Typedefs
a
c
h
j
o
s
t
Enumerations
a
c
d
e
h
s
t
w
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
p
r
s
t
u
v
Macros
a
b
e
f
g
i
l
m
o
p
s
t
u
w
SLInputDevice.cpp
Go to the documentation of this file.
1
/**
2
* \file SLInputDevice.cpp
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
#include <algorithm>
11
#include <
SLInputManager.h
>
12
13
//-----------------------------------------------------------------------------
14
/*! Constructor for SLInputDevices. This will automatically enable the device,
15
adding them to the SLInputManager.
16
*/
17
SLInputDevice::SLInputDevice
(
SLInputManager
& inputManager)
18
: _inputManager(inputManager)
19
{
20
// enable any input device on creation
21
enable
();
22
}
23
//-----------------------------------------------------------------------------
24
/*! The destructor removes the device from SLInputManager again if necessary.
25
*/
26
SLInputDevice::~SLInputDevice
()
27
{
28
disable
();
29
}
30
//-----------------------------------------------------------------------------
31
/*! Enabling an SLInputDevice will add it to the device list kept by
32
SLInputManager
33
*/
34
void
SLInputDevice::enable
()
35
{
36
_inputManager
.
devices
().push_back(
this
);
37
}
38
//-----------------------------------------------------------------------------
39
/*! Enabling an SLInputDevice will remove it from the device list kept by
40
SLInputManager
41
*/
42
void
SLInputDevice::disable
()
43
{
44
SLVInputDevice
& dl =
_inputManager
.
devices
();
45
dl.erase(std::remove(dl.begin(), dl.end(),
this
), dl.end());
46
}
47
//-----------------------------------------------------------------------------
SLVInputDevice
vector< SLInputDevice * > SLVInputDevice
Definition:
SLInputDevice.h:37
SLInputManager.h
SLInputDevice::_inputManager
SLInputManager & _inputManager
Definition:
SLInputDevice.h:34
SLInputDevice::enable
void enable()
Definition:
SLInputDevice.cpp:34
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
SLInputManager::devices
SLVInputDevice & devices()
Definition:
SLInputManager.h:31
modules
sl
source
input
SLInputDevice.cpp
Generated by
1.9.1