Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/network3/src/orxonox/objects/SpaceShip.h @ 1338

Last change on this file since 1338 was 1250, checked in by scheusso, 17 years ago

memory free problem

File size: 3.9 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:
[1212]25 *      Benjamin Knecht
[1039]26 *
27 */
28
[608]29#ifndef _SpaceShip_H__
30#define _SpaceShip_H__
31
[1039]32#include "OrxonoxPrereqs.h"
33
[708]34#include <OgrePrerequisites.h>
35#include <OIS/OISMouse.h>
[608]36
[1212]37#include "Camera.h"
[608]38#include "Model.h"
[768]39#include "../tools/BillboardSet.h"
[633]40
[1212]41
[608]42namespace orxonox
43{
[729]44    class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener
[608]45    {
46        public:
47            SpaceShip();
48            ~SpaceShip();
[1021]49            bool create();
50            void registerAllVariables();
[871]51            void init();
[697]52            void setConfigValues();
[608]53            virtual void loadParams(TiXmlElement* xmlElem);
[1052]54            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
[608]55            virtual void tick(float dt);
[736]56
[871]57            void setCamera(const std::string& camera = "");
58            void setMaxSpeed(float value);
59            void setMaxSideAndBackSpeed(float value);
60            void setMaxRotation(float value);
61            void setTransAcc(float value);
62            void setRotAcc(float value);
63            void setTransDamp(float value);
64            void setRotDamp(float value);
[1232]65           
66            void getFocus();
[871]67
[1052]68            static void setMaxSpeedTest(float value)
69                { SpaceShip::instance_s->setMaxSpeed(value); }
70
[608]71            bool mouseMoved(const OIS::MouseEvent &e);
[643]72            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
73            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
[608]74
75
76        private:
[1184]77            void createCamera();
[1052]78            static SpaceShip* instance_s;
79
[786]80            Vector3 testvector_;
[647]81            bool bInvertYAxis_;
[608]82            bool setMouseEventCallback_;
[644]83            bool bLMousePressed_;
84            bool bRMousePressed_;
[608]85
[644]86            Ogre::SceneNode* camNode_;
[1232]87            Camera* cam_; 
88            std::string camName_;
[644]89
[1232]90
[708]91            ParticleInterface* tt_;
[608]92
[633]93            BillboardSet redBillboard_;
94            BillboardSet greenBillboard_;
95            Ogre::SceneNode* redNode_;
96            Ogre::SceneNode* greenNode_;
97            float blinkTime_;
98
[661]99            BillboardSet crosshairNear_;
100            BillboardSet crosshairFar_;
101            Ogre::SceneNode* chNearNode_;
102            Ogre::SceneNode* chFarNode_;
103
[643]104            float timeToReload_;
105            float reloadTime_;
106
[647]107            float maxSideAndBackSpeed_;
108            float maxSpeed_;
109            float maxRotation_;
110            float translationAcceleration_;
111            float rotationAcceleration_;
112            float translationDamping_;
113            float rotationDamping_;
114
115            Radian maxRotationRadian_;
116            Radian rotationAccelerationRadian_;
117            Radian rotationDampingRadian_;
118            Radian zeroRadian_;
119            Radian mouseXRotation_;
120            Radian mouseYRotation_;
121
122            float mouseX_;
123            float mouseY_;
124
[1037]125            float emitterRate_;
[1250]126           
127            bool server_;
[608]128    };
129}
130
[673]131#endif /* _SpaceShip_H__ */
Note: See TracBrowser for help on using the repository browser.