9 // Interface for the "Engine" part of a PropEngine object. This is a
10 // virtual class, intended to be implemented by stuff like
11 // PistonEngine and TurbineEngine, and maybe exotics like
12 // SolarElectricEngine, etc...
17 virtual PistonEngine* isPistonEngine() { return 0; }
19 void setThrottle(float throttle) { _throttle = throttle; }
20 void setStarter(bool starter) { _starter = starter; }
21 void setMagnetos(int magnetos) { _magnetos = magnetos; }
22 void setMixture(float mixture) { _mixture = mixture; }
23 void setBoost(float boost) { _boost = boost; }
24 void setFuelState(bool hasFuel) { _fuel = hasFuel; }
25 void setRunning(bool r) { _running = r; }
27 bool isRunning() { return _running; }
28 virtual bool isCranking() { return false; }
30 virtual void calc(float pressure, float temp, float speed) = 0;
31 virtual float getTorque() = 0;
32 virtual float getFuelFlow() = 0;
36 bool _starter; // true=engaged, false=disengaged
37 int _magnetos; // 0=off, 1=right, 2=left, 3=both