| [171] | 1 | /* | 
|---|
 | 2 |  *   ORXONOX - the hottest 3D action shooter ever to exist | 
|---|
 | 3 |  * | 
|---|
 | 4 |  * | 
|---|
 | 5 |  *   License notice: | 
|---|
 | 6 |  * | 
|---|
 | 7 |  *   This program is free software: you can redistribute it and/or modify | 
|---|
 | 8 |  *   it under the terms of the GNU General Public License as published by | 
|---|
 | 9 |  *   the Free Software Foundation, either version 3 of the License, or | 
|---|
 | 10 |  *   (at your option) any later version. | 
|---|
 | 11 |  * | 
|---|
 | 12 |  *   This program is distributed in the hope that it will be useful, | 
|---|
 | 13 |  *   but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
 | 14 |  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
 | 15 |  *   GNU General Public License for more details. | 
|---|
 | 16 |  * | 
|---|
 | 17 |  *   You should have received a copy of the GNU General Public License | 
|---|
 | 18 |  *   along with this program.  If not, see <http://www.gnu.org/licenses/>. | 
|---|
 | 19 |  * | 
|---|
 | 20 |  * | 
|---|
 | 21 |  *   Author: | 
|---|
 | 22 |  *      Reto Grieder | 
|---|
 | 23 |  *   Co-authors: | 
|---|
 | 24 |  *      ... | 
|---|
 | 25 |  * | 
|---|
 | 26 |  */ | 
|---|
 | 27 |  | 
|---|
 | 28 |  | 
|---|
 | 29 | #ifndef ORXONOX_SHIP_H | 
|---|
 | 30 | #define ORXONOX_SHIP_H | 
|---|
 | 31 |  | 
|---|
 | 32 | #include "OgrePrerequisites.h" | 
|---|
 | 33 |  | 
|---|
 | 34 | #include "orxonox_prerequisites.h" | 
|---|
 | 35 |  | 
|---|
 | 36 |  | 
|---|
 | 37 | namespace orxonox { | 
|---|
 | 38 |  | 
|---|
 | 39 |   class OrxonoxShip | 
|---|
 | 40 |   { | 
|---|
 | 41 |   public: | 
|---|
 | 42 |           OrxonoxShip(Ogre::SceneManager*, Ogre::SceneNode*); | 
|---|
 | 43 |           virtual ~OrxonoxShip(); | 
|---|
 | 44 |  | 
|---|
 | 45 |           virtual bool initialise(); | 
|---|
 | 46 |  | 
|---|
 | 47 |           void setMainThrust(const Ogre::Real); | 
|---|
 | 48 |           void setSideThrust(const Ogre::Real); | 
|---|
 | 49 |     void setYThrust(const Ogre::Real); | 
|---|
 | 50 |           void turnUpAndDown(const Ogre::Radian&); | 
|---|
 | 51 |           void turnLeftAndRight(const Ogre::Radian&); | 
|---|
 | 52 |  | 
|---|
 | 53 |     Ogre::SceneNode* getRootNode(); | 
|---|
 | 54 |     Ogre::Vector3 getSpeed(); | 
|---|
 | 55 |  | 
|---|
 | 56 |           Bullet* fire(); | 
|---|
 | 57 |  | 
|---|
 | 58 |           bool tick(unsigned long, Ogre::Real); | 
|---|
 | 59 |  | 
|---|
 | 60 |   protected: | 
|---|
 | 61 |  | 
|---|
 | 62 |   protected: | 
|---|
 | 63 |           Ogre::SceneManager *sceneMgr_; | 
|---|
 | 64 |           Ogre::SceneNode *rootNode_; | 
|---|
 | 65 |           Ogre::Entity *shipEntity_; | 
|---|
 | 66 |  | 
|---|
 | 67 |           Ogre::Vector3 currentSpeed_;  // relative to space | 
|---|
 | 68 |           Ogre::Vector3 currentThrust_; // relative to the ship | 
|---|
 | 69 |     Ogre::Real baseThrust_; | 
|---|
 | 70 |           int objectCounter_; | 
|---|
 | 71 |           Ogre::Vector3 bulletSpeed_; | 
|---|
 | 72 |  | 
|---|
 | 73 |     WeaponManager *mainWeapon_; | 
|---|
 | 74 |   }; | 
|---|
 | 75 |  | 
|---|
 | 76 | } | 
|---|
 | 77 |  | 
|---|
 | 78 | #endif /* ORXONOX_SHIP_H */ | 
|---|