VR-Forces 4.6.1 Class Documentation
 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 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)