2 #include "Thruster.hpp"
7 _dir[0] = 1; _dir[1] = 0; _dir[2] = 0;
8 for(int i=0; i<3; i++) _pos[i] = _wind[i] = 0;
19 void Thruster::getPosition(float* out)
21 for(int i=0; i<3; i++) out[i] = _pos[i];
24 void Thruster::setPosition(float* pos)
26 for(int i=0; i<3; i++) _pos[i] = pos[i];
29 void Thruster::getDirection(float* out)
31 for(int i=0; i<3; i++) out[i] = _dir[i];
34 void Thruster::setDirection(float* dir)
36 Math::unit3(dir, _dir);
39 void Thruster::setThrottle(float throttle)
44 void Thruster::setMixture(float mixture)
49 void Thruster::setPropAdvance(float propAdvance)
51 _propAdvance = propAdvance;
54 void Thruster::setWind(float* wind)
56 for(int i=0; i<3; i++) _wind[i] = wind[i];
59 void Thruster::setDensity(float rho)
64 void Thruster::cloneInto(Thruster* out)
66 for(int i=0; i<3; i++) {
67 out->_pos[i] = _pos[i];
68 out->_dir[i] = _dir[i];
70 out->_throttle = _throttle;
71 out->_mixture = _mixture;
72 out->_propAdvance = _propAdvance;