Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
LandingGear.h
Go to the documentation of this file.
1 /* Project Starshatter 4.5
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: Stars.exe
6  FILE: LandingGear.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Fighter undercarriage (landing gear) system class
13 */
14 
15 #ifndef LandingGear_h
16 #define LandingGear_h
17 
18 #include "Types.h"
19 #include "System.h"
20 #include "Solid.h"
21 
22 // +--------------------------------------------------------------------+
23 
24 class Ship;
25 
26 // +--------------------------------------------------------------------+
27 
28 class LandingGear : public System
29 {
30 public:
31  enum CONSTANTS { MAX_GEAR = 4 };
33 
34  LandingGear();
35  LandingGear(const LandingGear& rhs);
36  virtual ~LandingGear();
37 
38  virtual int AddGear(Model* m, const Point& s, const Point& e);
39  virtual void ExecFrame(double seconds);
40  virtual void Orient(const Physical* rep);
41 
42  GEAR_STATE GetState() const { return state; }
43  void SetState(GEAR_STATE s);
44  int NumGear() const { return ngear; }
45  Solid* GetGear(int i);
46  Point GetGearStop(int i);
47  double GetTouchDown();
48  double GetClearance() const { return clearance; }
49 
50  static void Initialize();
51  static void Close();
52 
53 protected:
55  double transit;
56  double clearance;
57 
58  int ngear;
63 };
64 
65 #endif LandingGear_h
66