Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 1039 was 1039, checked in by rgrieder, 16 years ago
  • train riding doesn't have to be boring
  • added some license notes
  • removed certain header dependencies in audio
  • changed order of header file inclusion in orxonox and audio (coding style guide will be updated)
File size: 3.5 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, bool loading);
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            bool mouseMoved(const OIS::MouseEvent &e);
64            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
65            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
66
67
68        private:
69            Vector3 testvector_;
70            bool bInvertYAxis_;
71            bool setMouseEventCallback_;
72            bool bLMousePressed_;
73            bool bRMousePressed_;
74
75            Ogre::SceneNode* camNode_;
76
77            ParticleInterface* tt_;
78
79            BillboardSet redBillboard_;
80            BillboardSet greenBillboard_;
81            Ogre::SceneNode* redNode_;
82            Ogre::SceneNode* greenNode_;
83            float blinkTime_;
84
85            BillboardSet crosshairNear_;
86            BillboardSet crosshairFar_;
87            Ogre::SceneNode* chNearNode_;
88            Ogre::SceneNode* chFarNode_;
89
90            float timeToReload_;
91            float reloadTime_;
92
93            float maxSideAndBackSpeed_;
94            float maxSpeed_;
95            float maxRotation_;
96            float translationAcceleration_;
97            float rotationAcceleration_;
98            float translationDamping_;
99            float rotationDamping_;
100
101            Radian maxRotationRadian_;
102            Radian rotationAccelerationRadian_;
103            Radian rotationDampingRadian_;
104            Radian zeroRadian_;
105            Radian mouseXRotation_;
106            Radian mouseYRotation_;
107
108            float mouseX_;
109            float mouseY_;
110
111            float emitterRate_;
112    };
113}
114
115#endif /* _SpaceShip_H__ */
Note: See TracBrowser for help on using the repository browser.