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*, weapon::BulletManager*); |
---|
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 | InertialNode* getRootNode(); |
---|
54 | Ogre::Vector3 getSpeed(); |
---|
55 | |
---|
56 | void fire(); |
---|
57 | |
---|
58 | bool tick(unsigned long, Ogre::Real); |
---|
59 | |
---|
60 | protected: |
---|
61 | |
---|
62 | protected: |
---|
63 | Ogre::SceneManager *sceneMgr_; |
---|
64 | //Ogre::SceneNode *rootNode_; |
---|
65 | InertialNode *rootNode_; |
---|
66 | Ogre::Entity *shipEntity_; |
---|
67 | |
---|
68 | //Ogre::Vector3 currentSpeed_; // relative to space |
---|
69 | Ogre::Vector3 currentThrust_; // relative to the ship |
---|
70 | Ogre::Real baseThrust_; |
---|
71 | int objectCounter_; |
---|
72 | |
---|
73 | weapon::BulletManager *bulletManager_; |
---|
74 | //Ogre::Vector3 bulletSpeed_; |
---|
75 | |
---|
76 | weapon::WeaponManager *mainWeapon_; |
---|
77 | }; |
---|
78 | |
---|
79 | } |
---|
80 | |
---|
81 | #endif /* ORXONOX_SHIP_H */ |
---|