Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/objects/SpaceShip.h @ 1052

Last change on this file since 1052 was 1052, checked in by landauf, 16 years ago

merged core2 back to trunk
there might be some errors, wasn't able to test it yet due to some strange g++ and linker behaviour.

File size: 3.7 KB
Line 
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
8 *   modify it under the terms of the GNU General Public License
9 *   as published by the Free Software Foundation; either version 2
10 *   of the License, or (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, write to the Free Software
19 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 *
21 *   Author:
22 *      Fabian 'x3n' Landau
23 *   Co-authors:
24 *      ...
25 *
26 */
27
28#ifndef _SpaceShip_H__
29#define _SpaceShip_H__
30
31#include "OrxonoxPrereqs.h"
32
33#include <OgrePrerequisites.h>
34#include <OIS/OISMouse.h>
35
36#include "Model.h"
37#include "../tools/BillboardSet.h"
38
39namespace orxonox
40{
41    class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener
42    {
43        public:
44            SpaceShip();
45            ~SpaceShip();
46            bool create();
47            void registerAllVariables();
48            void init();
49            void setConfigValues();
50            virtual void loadParams(TiXmlElement* xmlElem);
51            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
52            virtual void tick(float dt);
53
54            void setCamera(const std::string& camera = "");
55            void setMaxSpeed(float value);
56            void setMaxSideAndBackSpeed(float value);
57            void setMaxRotation(float value);
58            void setTransAcc(float value);
59            void setRotAcc(float value);
60            void setTransDamp(float value);
61            void setRotDamp(float value);
62
63            static void setMaxSpeedTest(float value)
64                { SpaceShip::instance_s->setMaxSpeed(value); }
65
66            bool mouseMoved(const OIS::MouseEvent &e);
67            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
68            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
69
70
71        private:
72            static SpaceShip* instance_s;
73
74            Vector3 testvector_;
75            bool bInvertYAxis_;
76            bool setMouseEventCallback_;
77            bool bLMousePressed_;
78            bool bRMousePressed_;
79
80            Ogre::SceneNode* camNode_;
81
82            ParticleInterface* tt_;
83
84            BillboardSet redBillboard_;
85            BillboardSet greenBillboard_;
86            Ogre::SceneNode* redNode_;
87            Ogre::SceneNode* greenNode_;
88            float blinkTime_;
89
90            BillboardSet crosshairNear_;
91            BillboardSet crosshairFar_;
92            Ogre::SceneNode* chNearNode_;
93            Ogre::SceneNode* chFarNode_;
94
95            float timeToReload_;
96            float reloadTime_;
97
98            float maxSideAndBackSpeed_;
99            float maxSpeed_;
100            float maxRotation_;
101            float translationAcceleration_;
102            float rotationAcceleration_;
103            float translationDamping_;
104            float rotationDamping_;
105
106            Radian maxRotationRadian_;
107            Radian rotationAccelerationRadian_;
108            Radian rotationDampingRadian_;
109            Radian zeroRadian_;
110            Radian mouseXRotation_;
111            Radian mouseYRotation_;
112
113            float mouseX_;
114            float mouseY_;
115
116            float emitterRate_;
117    };
118}
119
120#endif /* _SpaceShip_H__ */
Note: See TracBrowser for help on using the repository browser.