Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MultiController.h
Go to the documentation of this file.
1 /* Project nGenEx
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: nGenEx.lib
6  FILE: MultiController.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  ComboController Motion Controller class
13 */
14 
15 #ifndef MultiController_h
16 #define MultiController_h
17 
18 #include "MotionController.h"
19 
20 // +--------------------------------------------------------------------+
21 
23 {
24 public:
25  static const char* TYPENAME() { return "MultiController"; }
26 
28  virtual ~MultiController();
29 
30  virtual void AddController(MotionController* c);
31  virtual void MapKeys(KeyMapEntry* mapping, int nkeys);
32  virtual void SwapYawRoll(int swap);
33  virtual int GetSwapYawRoll() const;
34 
35  // sample the physical device
36  virtual void Acquire();
37 
38  // translations
39  virtual double X() { return x; }
40  virtual double Y() { return y; }
41  virtual double Z() { return z; }
42 
43  // rotations
44  virtual double Pitch() { return p; }
45  virtual double Roll() { return r; }
46  virtual double Yaw() { return w; }
47  virtual int Center() { return c; }
48 
49  // throttle
50  virtual double Throttle() { return t; }
51  virtual void SetThrottle(double throttle);
52 
53  // actions
54  virtual int Action(int n) { return action[n]; }
55  virtual int ActionMap(int n);
56 
57 protected:
58  int nctrl;
60 
61  double x,y,z,p,r,w,t;
62  double p1, r1, w1;
63  int c;
65 };
66 
67 #endif // MultiController_h
68