Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 1504 was 1504, checked in by rgrieder, 17 years ago

Once again, set all the svn:eol-style property to native. I really hope this doesn't pose more problems than it solves..

  • Property eol-style set to native
File size: 5.0 KB
RevLine 
[1039]1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
[1056]3 *                    > www.orxonox.net <
[1039]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:
[1293]25 *      Benjamin Knecht
[1039]26 *
27 */
28
[608]29#ifndef _SpaceShip_H__
30#define _SpaceShip_H__
[1362]31#include <string>
[1039]32#include "OrxonoxPrereqs.h"
[708]33#include <OgrePrerequisites.h>
[1502]34
[1362]35#include "util/Math.h"
[1293]36#include "core/InputInterfaces.h"
37#include "Camera.h"
[608]38#include "Model.h"
[768]39#include "../tools/BillboardSet.h"
[633]40
[608]41namespace orxonox
42{
[1502]43    class _OrxonoxExport SpaceShip : public Model
[608]44    {
45        public:
[1502]46
[1360]47            static SpaceShip *getLocalShip();
[1502]48
[608]49            SpaceShip();
50            ~SpaceShip();
[1502]51            virtual bool create();
[1021]52            void registerAllVariables();
[871]53            void init();
[697]54            void setConfigValues();
[1052]55            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
[608]56            virtual void tick(float dt);
[736]57
[871]58            void setCamera(const std::string& camera = "");
59            void setMaxSpeed(float value);
60            void setMaxSideAndBackSpeed(float value);
61            void setMaxRotation(float value);
62            void setTransAcc(float value);
63            void setRotAcc(float value);
64            void setTransDamp(float value);
65            void setRotDamp(float value);
[1502]66            void getFocus();
[871]67
[1362]68            static std::string whereAmI();
[1052]69            static void setMaxSpeedTest(float value)
70                { SpaceShip::instance_s->setMaxSpeed(value); }
71
[1502]72            static void movePitch(float value);
73            static void moveYaw(float value);
74            static void moveRoll(float value);
75            static void moveLongitudinal(float value);
76            static void moveLateral(float value);
77            static void fire();
78            void setMovePitch(float value);
79            void setMoveYaw(float value);
80            void setMoveRoll(float value);
81            void setMoveLongitudinal(float value);
82            void setMoveLateral(float value);
83            void doFire();
84
[1407]85            float getMaxSpeed();
[1502]86            Vector3 getDir();
87            Vector3 getOrth();
88            Camera* getCamera();
[608]89
[1502]90            int getTeamNr() const
91                { return this->teamNr_; }
92            int getHealth() const
93                { return this->health_; }
94
95            bool getMyShip(){return myShip_;}
96
97        protected:
98            void setTeamNr(int teamNr)
99                { this->teamNr_ = teamNr; }
100
[608]101        private:
[1293]102            void createCamera();
[1502]103            virtual ColourValue getProjectileColour() const
104                { return ColourValue(1.0, 1.0, 0.5); }
[1052]105
[1407]106            Vector3 testvector_;
[1502]107            Vector3 initialDir_;
108            Vector3 currentDir_;
109            Vector3 initialOrth_;
110            Vector3 currentOrth_;
[647]111            bool bInvertYAxis_;
[608]112            bool setMouseEventCallback_;
[644]113            bool bLMousePressed_;
114            bool bRMousePressed_;
[608]115
[644]116            Ogre::SceneNode* camNode_;
[1362]117            Camera* cam_;
[1293]118            std::string camName_;
[644]119
[1293]120
[708]121            ParticleInterface* tt_;
[608]122
[633]123            BillboardSet redBillboard_;
124            BillboardSet greenBillboard_;
125            Ogre::SceneNode* redNode_;
126            Ogre::SceneNode* greenNode_;
127            float blinkTime_;
128
[661]129            BillboardSet crosshairNear_;
130            BillboardSet crosshairFar_;
131            Ogre::SceneNode* chNearNode_;
132            Ogre::SceneNode* chFarNode_;
133
[643]134            float timeToReload_;
135            float reloadTime_;
136
[647]137            float maxSideAndBackSpeed_;
138            float maxSpeed_;
139            float maxRotation_;
140            float translationAcceleration_;
141            float rotationAcceleration_;
142            float translationDamping_;
143            float rotationDamping_;
144
145            Radian maxRotationRadian_;
146            Radian rotationAccelerationRadian_;
147            Radian rotationDampingRadian_;
148            Radian zeroRadian_;
149            Radian mouseXRotation_;
150            Radian mouseYRotation_;
151
152            float mouseX_;
153            float mouseY_;
154
[1037]155            float emitterRate_;
[1502]156
157        protected:
158            bool myShip_;
159
160            int teamNr_;
161            int health_;
162
163            static SpaceShip* instance_s;
[608]164    };
165}
166
[673]167#endif /* _SpaceShip_H__ */
Note: See TracBrowser for help on using the repository browser.