Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/camera/src/orxonox/objects/SpaceShip.h @ 1416

Last change on this file since 1416 was 1201, checked in by bknecht, 17 years ago

CameraHandler and Camera work now

File size: 3.8 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:
[1201]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
[1201]37#include "Camera.h"
[608]38#include "Model.h"
[768]39#include "../tools/BillboardSet.h"
[633]40
[1201]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);
65
[1052]66            static void setMaxSpeedTest(float value)
67                { SpaceShip::instance_s->setMaxSpeed(value); }
68
[608]69            bool mouseMoved(const OIS::MouseEvent &e);
[643]70            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
71            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
[608]72
73
74        private:
[1052]75            static SpaceShip* instance_s;
76
[786]77            Vector3 testvector_;
[647]78            bool bInvertYAxis_;
[608]79            bool setMouseEventCallback_;
[644]80            bool bLMousePressed_;
81            bool bRMousePressed_;
[608]82
[644]83            Ogre::SceneNode* camNode_;
[1201]84            Camera* cam_;
[644]85
[708]86            ParticleInterface* tt_;
[608]87
[633]88            BillboardSet redBillboard_;
89            BillboardSet greenBillboard_;
90            Ogre::SceneNode* redNode_;
91            Ogre::SceneNode* greenNode_;
92            float blinkTime_;
93
[661]94            BillboardSet crosshairNear_;
95            BillboardSet crosshairFar_;
96            Ogre::SceneNode* chNearNode_;
97            Ogre::SceneNode* chFarNode_;
98
[643]99            float timeToReload_;
100            float reloadTime_;
101
[647]102            float maxSideAndBackSpeed_;
103            float maxSpeed_;
104            float maxRotation_;
105            float translationAcceleration_;
106            float rotationAcceleration_;
107            float translationDamping_;
108            float rotationDamping_;
109
110            Radian maxRotationRadian_;
111            Radian rotationAccelerationRadian_;
112            Radian rotationDampingRadian_;
113            Radian zeroRadian_;
114            Radian mouseXRotation_;
115            Radian mouseYRotation_;
116
117            float mouseX_;
118            float mouseY_;
119
[1037]120            float emitterRate_;
[608]121    };
122}
123
[673]124#endif /* _SpaceShip_H__ */
Note: See TracBrowser for help on using the repository browser.