VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
16 
18 
19 namespace makVrv
20 {
21  class DtDe;
22  class DtGenericControllerEvent;
23  class DtControllerInformation;
24  class DtGameControllerJoystickEvent;
25  class DtGameControllerKeyboardEvent;
26  class DtJoystickManager;
27 
32  {
33  public:
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*,
78  virtual bool processKeyboardEvent(DtGameControllerKeyboardEvent*,
80  virtual bool processGenericEvent(DtGenericControllerEvent*,
82 
84  protected:
86  bool myActive;
89 
91 
92  double myValue;
93  double myLastValue;
95 
99  };
100 
103  {
104  public:
107 
110 
111  virtual DtGameControlProcessor* create();
112 
113  static DtGameControlProcessorCreator& instance(DtDe& de);
114  static void registerInstance(DtDe& de, DtGameControlProcessorCreator*);
115 
116  protected:
118  };
119 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
bool myValueChanged
Definition: gameControlProcessor.h:94
Registered creator for this class.
Definition: gameControlProcessor.h:102
DtDe & myDe
Definition: gameControlProcessor.h:117
double myMinimumValue
Definition: gameControlProcessor.h:87
double myLastValue
Definition: gameControlProcessor.h:93
This class will be used to query about current joysticks and the capabilities they might have...
Definition: joystickManager.h:96
double myValue
Definition: gameControlProcessor.h:92
double value()
Definition: gameControlProcessor.h:63
bool myActive
Definition: gameControlProcessor.h:86
Definition: gameControllerEvents.h:33
const DtGameControlInformation & gameControls() const
Definition: gameControlProcessor.h:66
#define DT_DLL_JOYSTICKCORE
Contains DLL export macros.
Definition: joystickCore.h:25
Contains makVrv::DtVirtualBaseClass class.
DtGameControllerKeyboardEvent class wraps a keyboard event.
Definition: gameControllerEvents.h:60
Definition: gameControlInformation.h:46
bool active() const
Definition: gameControlProcessor.h:67
DtDe & myDe
Definition: gameControlProcessor.h:96
int myEventActive
Definition: gameControlProcessor.h:90
DtGameControllerJoystickEvent wraps a joystick event.
Definition: gameControllerEvents.h:91
This class will keep control of a particular game control function given the events it can control...
Definition: gameControlProcessor.h:31
double myMaximumValue
Definition: gameControlProcessor.h:88
bool myActiveEventIsAxis
Definition: gameControlProcessor.h:98
The DtGameControlInformation class contains information about how a function within a function group ...
Definition: gameControlInformation.h:32
bool valueChanged()
Definition: gameControlProcessor.h:64
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
DtGameControlInformation myControls
Return true if this is a possible key up event for the given event.
Definition: gameControlProcessor.h:85
DtJoystickManager & myJoystickManager
Definition: gameControlProcessor.h:97

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)