VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
joystickCore
gameControlProcessor.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2013 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
8
10
11
#pragma once
12
13
#include <
joystickCore/joystickCore.h
>
14
#include <
joystickCore/joystickConfigurations.h
>
15
#include <
joystickCore/gameControlInformation.h
>
16
17
#include <
vrvUtil/DtVirtualBaseClass.h
>
18
19
namespace
makVrv
20
{
21
class
DtDe;
22
class
DtGenericControllerEvent;
23
class
DtControllerInformation;
24
class
DtGameControllerJoystickEvent;
25
class
DtGameControllerKeyboardEvent;
26
class
DtJoystickManager;
27
31
class
DT_DLL_JOYSTICKCORE
DtGameControlProcessor
32
{
33
public
:
35
DtGameControlProcessor
(
DtDe
&);
36
DtGameControlProcessor
(
const
DtGameControlProcessor
&);
37
39
virtual
~
DtGameControlProcessor
();
40
41
virtual
void
setGameControls(
const
DtGameControlInformation
&);
42
44
virtual
DtGameControlProcessor
& operator=(
const
DtGameControlProcessor
&);
45
47
virtual
bool
updateFunctionStatus(
DtGenericControllerEvent
*,
bool
& repeat);
48
51
virtual
bool
noQueuedEvents();
52
54
virtual
bool
eventActive(
DtGenericControllerEvent
*)
const
;
55
58
virtual
bool
isReleaseEvent(
DtGenericControllerEvent
* e)
const
;
59
61
virtual
bool
canProcessEvent(
DtGenericControllerEvent
*)
const
;
62
63
double
value
() {
return
myValue; };
64
bool
valueChanged
() {
return
myValueChanged; };
65
66
const
DtGameControlInformation
&
gameControls
()
const
{
return
myControls; };
67
bool
active
()
const
{
return
myActive; };
68
virtual
void
setActive(
bool
);
69
70
virtual
void
setRange(
double
min,
double
max);
71
void
getRange(
double
& min,
double
& max);
72
73
virtual
DtUnicode
descriptiveString()
const
;
74
75
protected
:
76
virtual
bool
processJoystickEvent(
DtGameControllerJoystickEvent
*,
77
const
DtGameControlInformation::GameControlEvent
&);
78
virtual
bool
processKeyboardEvent(
DtGameControllerKeyboardEvent
*,
79
const
DtGameControlInformation::GameControlEvent
&);
80
virtual
bool
processGenericEvent(
DtGenericControllerEvent
*,
81
const
DtGameControlInformation::GameControlEvent
&);
82
84
protected
:
85
DtGameControlInformation
myControls
;
86
bool
myActive
;
87
double
myMinimumValue
;
88
double
myMaximumValue
;
89
90
int
myEventActive
;
91
92
double
myValue
;
93
double
myLastValue
;
94
bool
myValueChanged
;
95
96
DtDe
&
myDe
;
97
DtJoystickManager
&
myJoystickManager
;
98
bool
myActiveEventIsAxis
;
99
};
100
102
class
DT_DLL_JOYSTICKCORE
DtGameControlProcessorCreator
:
public
DtVirtualBaseClass
103
{
104
public
:
106
DtGameControlProcessorCreator
(
DtDe
&);
107
109
virtual
~
DtGameControlProcessorCreator
();
110
111
virtual
DtGameControlProcessor
* create();
112
113
static
DtGameControlProcessorCreator
& instance(
DtDe
& de);
114
static
void
registerInstance(
DtDe
& de,
DtGameControlProcessorCreator
*);
115
116
protected
:
117
DtDe
&
myDe
;
118
};
119
}
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)