namespace yasim {
class Gear;
+class Hook;
+class Launchbar;
class Thruster;
class Airplane {
~Airplane();
void iterate(float dt);
- void consumeFuel(float dt);
+ void calcFuelWeights();
ControlMap* getControlMap();
Model* getModel();
float taper=1, float mid=0.5);
int addTank(float* pos, float cap, float fuelDensity);
void addGear(Gear* g);
+ void addHook(Hook* h);
+ void addLaunchbar(Launchbar* l);
void addThruster(Thruster* t, float mass, float* cg);
void addBallast(float* pos, float mass);
int numGear();
Gear* getGear(int g);
+ Hook* getHook();
+ Launchbar* getLaunchbar();
+ int numThrusters() { return _thrusters.size(); }
+ Thruster* getThruster(int n) {
+ return ((ThrustRec*)_thrusters.get(n))->thruster; }
+
int numTanks();
void setFuelFraction(float frac); // 0-1, total amount of fuel
float getFuel(int tank); // in kg!
+ float setFuel(int tank, float fuel); // in kg!
float getFuelDensity(int tank); // kg/m^3
float getTankCapacity(int tank);
struct Control { int control; float val; };
struct WeightRec { int handle; Surface* surf; };
struct SolveWeight { bool approach; int idx; float wgt; };
+ struct ContactRec { Gear* gear; float p[3]; };
void runCruise();
void runApproach();