Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/input/src/orxonox/objects/SpaceShip.h @ 1259

Last change on this file since 1259 was 1259, checked in by rgrieder, 16 years ago

many minor changes, but it's more of a 'svn save' since I'm gonna start rewriting parts of the keybinder

File size: 3.9 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Fabian 'x3n' Landau
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#ifndef _SpaceShip_H__
30#define _SpaceShip_H__
31
32#include "OrxonoxPrereqs.h"
33
34#include <OgrePrerequisites.h>
35
36#include "core/InputInterfaces.h"
37#include "Model.h"
38#include "../tools/BillboardSet.h"
39
40namespace orxonox
41{
42    class _OrxonoxExport SpaceShip : public Model, public MouseHandler
43    {
44        public:
45            SpaceShip();
46            ~SpaceShip();
47            bool create();
48            void registerAllVariables();
49            void init();
50            void setConfigValues();
51            virtual void loadParams(TiXmlElement* xmlElem);
52            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
53            virtual void tick(float dt);
54
55            void setCamera(const std::string& camera = "");
56            void setMaxSpeed(float value);
57            void setMaxSideAndBackSpeed(float value);
58            void setMaxRotation(float value);
59            void setTransAcc(float value);
60            void setRotAcc(float value);
61            void setTransDamp(float value);
62            void setRotDamp(float value);
63
64            static void setMaxSpeedTest(float value)
65                { SpaceShip::instance_s->setMaxSpeed(value); }
66
67            bool mouseButtonPressed (const MouseState& state, MouseButton::Enum id);
68            bool mouseButtonReleased(const MouseState& state, MouseButton::Enum id);
69            bool mouseButtonHeld    (const MouseState& state, MouseButton::Enum id) { return true; }
70            bool mouseMoved         (const MouseState& state);
71            bool mouseScrolled      (const MouseState& state) { return true; }
72
73
74        private:
75            static SpaceShip* instance_s;
76
77            Vector3 testvector_;
78            bool bInvertYAxis_;
79            bool setMouseEventCallback_;
80            bool bLMousePressed_;
81            bool bRMousePressed_;
82
83            Ogre::SceneNode* camNode_;
84
85            ParticleInterface* tt_;
86
87            BillboardSet redBillboard_;
88            BillboardSet greenBillboard_;
89            Ogre::SceneNode* redNode_;
90            Ogre::SceneNode* greenNode_;
91            float blinkTime_;
92
93            BillboardSet crosshairNear_;
94            BillboardSet crosshairFar_;
95            Ogre::SceneNode* chNearNode_;
96            Ogre::SceneNode* chFarNode_;
97
98            float timeToReload_;
99            float reloadTime_;
100
101            float maxSideAndBackSpeed_;
102            float maxSpeed_;
103            float maxRotation_;
104            float translationAcceleration_;
105            float rotationAcceleration_;
106            float translationDamping_;
107            float rotationDamping_;
108
109            Radian maxRotationRadian_;
110            Radian rotationAccelerationRadian_;
111            Radian rotationDampingRadian_;
112            Radian zeroRadian_;
113            Radian mouseXRotation_;
114            Radian mouseYRotation_;
115
116            float mouseX_;
117            float mouseY_;
118
119            float emitterRate_;
120    };
121}
122
123#endif /* _SpaceShip_H__ */
Note: See TracBrowser for help on using the repository browser.