Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FlightComp.h
Go to the documentation of this file.
1 /* Project STARSHATTER
2  John DiCamillo
3  Copyright © 1997-2002. All Rights Reserved.
4 
5  SUBSYSTEM: Stars.exe
6  FILE: FlightComp.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Flight Computer systems class
13 */
14 
15 #ifndef FLIGHT_COMP_H
16 #define FLIGHT_COMP_H
17 
18 #include "Types.h"
19 #include "Computer.h"
20 #include "Geometry.h"
21 
22 // +--------------------------------------------------------------------+
23 
24 class Ship;
25 
26 // +--------------------------------------------------------------------+
27 
28 class FlightComp : public Computer
29 {
30 public:
32 
33  FlightComp(int comp_type, const char* comp_name);
34  FlightComp(const Computer& rhs);
35  virtual ~FlightComp();
36 
37  virtual void ExecSubFrame();
38 
39  int Mode() const { return mode; }
40  double Throttle() const { return throttle; }
41 
42  void SetMode(int m) { mode = m; }
43  void SetVelocityLimit(double v) { vlimit = (float) v; }
44  void SetTransLimit(double x, double y, double z);
45 
46  void FullStop() { halt = true; }
47 
48 protected:
49  virtual void ExecTrans();
50  virtual void ExecThrottle();
51 
52  int mode;
53  int halt;
54  float throttle;
55 
56  float vlimit;
60 };
61 
62 #endif FLIGHT_COMP_H
63