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