2 #include "Thruster.hpp"
7 _dir[0] = 1; _dir[1] = 0; _dir[2] = 0;
9 for(i=0; i<3; i++) _pos[i] = _wind[i] = 0;
13 _pressure = _temp = _rho = 0;
20 void Thruster::getPosition(float* out)
23 for(i=0; i<3; i++) out[i] = _pos[i];
26 void Thruster::setPosition(float* pos)
29 for(i=0; i<3; i++) _pos[i] = pos[i];
32 void Thruster::getDirection(float* out)
35 for(i=0; i<3; i++) out[i] = _dir[i];
38 void Thruster::setDirection(float* dir)
40 Math::unit3(dir, _dir);
43 void Thruster::setThrottle(float throttle)
45 _throttle = Math::clamp(throttle, -1, 1);
48 void Thruster::setMixture(float mixture)
50 _mixture = Math::clamp(mixture, 0, 1);
54 void Thruster::setStarter(bool starter)
59 void Thruster::setWind(float* wind)
62 for(i=0; i<3; i++) _wind[i] = wind[i];
65 void Thruster::setAir(float pressure, float temp, float density)