/* game/ship.h This file is part of the Osirion project and is distributed under the terms and conditions of the GNU General Public License version 2 */ #ifndef __INCLUDED_GAME_SHIP_H__ #define __INCLUDED_GAME_SHIP_H__ // project headers #include "math/vector3f.h" namespace game { class Ship { public: Ship(); ~Ship(); /// update the ship state void update(float elapsed); /// location of the ship in space math::Vector3f location; /// speed vector in units/second float speed; /// return the current yaw angle inline float yaw() const { return yaw_current; } /// set the target yaw angle void set_yaw(float y); /// return the current thruster power inline float thrust() const { return thrust_current; } /// set thruster power void set_thrust(float t); /* -- Ship SPECS --*/ /// acceleration float acceleration; /// maximum speed float speed_max; /// yaw turn speed float yaw_speed; private: /// current yaw, angle in XZ plane, 0-360 float yaw_current; /// target yaw angle, angle in XYplane, 0-360 float yaw_target; /// current thruster power in % [0-1] float thrust_current; }; } // namespace game #endif // __INCLUDED_GAME_SHIP_H__