GlobeEngine
Main Page
Namespaces
Classes
Files
File List
File Members
InputControl.h
Go to the documentation of this file.
1
//
2
// CoreViewerInputControl.h
3
//
4
// Created by Mathias Thöny on 27.12.11.
5
// Copyright (c) 2011 University of Zurich. All rights reserved.
6
//
7
8
#ifndef CoreEngine_InputControl_h
9
#define CoreEngine_InputControl_h
10
11
#include "OpenGL_Includes.h"
12
#include "
Engine.h
"
13
#include <vmmlib/matrix.hpp>
14
15
namespace
ge
{
16
class
InputControl
17
{
18
public
:
19
InputControl
();
20
~InputControl
();
21
22
void
clear
();
23
void
create
(
ge::Engine
* _game);
24
25
virtual
void
mouseMoveWhilePressedEvent
(
int
button,
int
x,
int
y) = 0;
26
// buttton: 0=Left 1=Middle 2=Right
27
// state: 0=pressed or clicked 1=released 2=double clicked
28
virtual
void
mouseButtonEvent
(
int
button,
int
state,
int
x,
int
y) = 0;
29
virtual
void
wheelEvent
(
float
_input) = 0;
30
31
virtual
void
keyPressEvent
(
unsigned
char
pKey) = 0;
32
virtual
void
keyReleaseEvent
(
unsigned
char
pKey) = 0;
33
virtual
void
mouseMoveStopEvent
() = 0;
34
virtual
void
mouseMoveEvent
(
int
x,
int
y) = 0;
35
36
bool
isAltPressed
();
37
bool
isShiftPressed
();
38
bool
isCtrlPressed
();
39
bool
isCtrlAltPressed
();
40
bool
isDeletePressed
();
41
42
void
isAltPressed
(
bool
_in);
43
void
isShiftPressed
(
bool
_in);
44
void
isCtrlPressed
(
bool
_in);
45
void
isCtrlAltPressed
(
bool
_in);
46
void
isDeletePressed
(
bool
_in);
47
48
protected
:
49
ge::Engine
*
game
;
50
51
vmml::Vector2f
preMoveRotation
;
52
vmml::Vector2f
postMoveRotation
;
53
vmml::Vector2f
changeRotation
;
54
55
vmml::Vector2f
preMoveShift
;
56
vmml::Vector2f
postMoveShift
;
57
vmml::Vector2f
changeShift
;
58
59
bool
mouseButtonHold
;
60
61
bool
altPressed
;
62
bool
shiftPressed
;
63
bool
ctrlPressed
;
64
bool
ctrlaltPressed
;
65
bool
deletePressed
;
66
};
67
}
68
#endif
ge::InputControl::mouseMoveWhilePressedEvent
virtual void mouseMoveWhilePressedEvent(int button, int x, int y)=0
ge::InputControl::postMoveShift
vmml::Vector2f postMoveShift
Definition:
InputControl.h:56
ge::InputControl::ctrlaltPressed
bool ctrlaltPressed
Definition:
InputControl.h:64
ge::InputControl::preMoveShift
vmml::Vector2f preMoveShift
Definition:
InputControl.h:55
ge::InputControl::preMoveRotation
vmml::Vector2f preMoveRotation
Definition:
InputControl.h:51
ge::InputControl::postMoveRotation
vmml::Vector2f postMoveRotation
Definition:
InputControl.h:52
ge::InputControl::ctrlPressed
bool ctrlPressed
Definition:
InputControl.h:63
ge::InputControl::changeRotation
vmml::Vector2f changeRotation
Definition:
InputControl.h:53
ge::InputControl::isAltPressed
bool isAltPressed()
Definition:
InputControl.cpp:29
ge::InputControl::clear
void clear()
Definition:
InputControl.cpp:13
ge::InputControl::mouseMoveStopEvent
virtual void mouseMoveStopEvent()=0
ge::InputControl::changeShift
vmml::Vector2f changeShift
Definition:
InputControl.h:57
ge::InputControl::isShiftPressed
bool isShiftPressed()
Definition:
InputControl.cpp:33
ge::InputControl::shiftPressed
bool shiftPressed
Definition:
InputControl.h:62
ge::InputControl::create
void create(ge::Engine *_game)
Definition:
InputControl.cpp:24
ge::InputControl::keyPressEvent
virtual void keyPressEvent(unsigned char pKey)=0
ge::InputControl::mouseButtonEvent
virtual void mouseButtonEvent(int button, int state, int x, int y)=0
ge::InputControl::altPressed
bool altPressed
Definition:
InputControl.h:61
ge::InputControl::mouseButtonHold
bool mouseButtonHold
Definition:
InputControl.h:59
ge::Engine
Definition:
Engine.h:20
Engine.h
ge::InputControl::game
ge::Engine * game
Definition:
InputControl.h:49
ge::InputControl::InputControl
InputControl()
Definition:
InputControl.cpp:5
ge::InputControl::mouseMoveEvent
virtual void mouseMoveEvent(int x, int y)=0
ge::InputControl::isCtrlPressed
bool isCtrlPressed()
Definition:
InputControl.cpp:37
ge::InputControl::isDeletePressed
bool isDeletePressed()
Definition:
InputControl.cpp:45
ge
Definition:
AvalancheTrainingSimulationEngine.h:28
ge::InputControl::keyReleaseEvent
virtual void keyReleaseEvent(unsigned char pKey)=0
ge::InputControl::deletePressed
bool deletePressed
Definition:
InputControl.h:65
ge::InputControl::isCtrlAltPressed
bool isCtrlAltPressed()
Definition:
InputControl.cpp:41
ge::InputControl
Definition:
InputControl.h:16
ge::InputControl::~InputControl
~InputControl()
Definition:
InputControl.cpp:9
ge::InputControl::wheelEvent
virtual void wheelEvent(float _input)=0
src
globeEngineCore
include
InputControl.h
Generated on Wed Aug 9 2017 14:47:06 for GlobeEngine by
1.8.9