Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core2/src/orxonox/objects/SpaceShip.h @ 1001

Last change on this file since 1001 was 947, checked in by landauf, 16 years ago
  • added CommandExecutor
  • added ConsoleCommand macros
  • added getTypename to all MultiTypes
  • added 2 static maps to Identifier that contain all existing Identifiers with their names and lowercase names respectively.
  • added 2 maps to each Identifier that contain all console commands of the Identifier with their names and lowercase names respectively
  • using tolower(.) and toupper(.) instead of selfmade hacks in String.h
  • added AccessLevel enum
  • added some test-console-commands to OutputHandler, Ambient and SpaceShip
File size: 2.8 KB
RevLine 
[608]1#ifndef _SpaceShip_H__
2#define _SpaceShip_H__
3
[708]4#include <OgrePrerequisites.h>
5#include <OIS/OISMouse.h>
[608]6
[708]7#include "../OrxonoxPrereqs.h"
8
[608]9#include "Model.h"
[768]10#include "../tools/BillboardSet.h"
[633]11
[708]12class TiXmlElement;          // Forward declaration
[608]13
14namespace orxonox
15{
[708]16    class ParticleInterface; // Forward declaration
17
[729]18    class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener
[608]19    {
20        public:
21            SpaceShip();
22            ~SpaceShip();
[871]23            void init();
[697]24            void setConfigValues();
[608]25            virtual void loadParams(TiXmlElement* xmlElem);
[902]26            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
[608]27            virtual void tick(float dt);
[736]28
[871]29            void setCamera(const std::string& camera = "");
30            void setMaxSpeed(float value);
31            void setMaxSideAndBackSpeed(float value);
32            void setMaxRotation(float value);
33            void setTransAcc(float value);
34            void setRotAcc(float value);
35            void setTransDamp(float value);
36            void setRotDamp(float value);
37
[947]38            static void setMaxSpeedTest(float value)
39                { SpaceShip::instance_s->setMaxSpeed(value); }
40
[608]41            bool mouseMoved(const OIS::MouseEvent &e);
[643]42            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
43            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
[608]44
45
46        private:
[947]47            static SpaceShip* instance_s;
48
[786]49            Vector3 testvector_;
[647]50            bool bInvertYAxis_;
[608]51            bool setMouseEventCallback_;
[644]52            bool bLMousePressed_;
53            bool bRMousePressed_;
[608]54
[644]55            Ogre::SceneNode* camNode_;
56
[708]57            ParticleInterface* tt_;
[608]58
[633]59            BillboardSet redBillboard_;
60            BillboardSet greenBillboard_;
61            Ogre::SceneNode* redNode_;
62            Ogre::SceneNode* greenNode_;
63            float blinkTime_;
64
[661]65            BillboardSet crosshairNear_;
66            BillboardSet crosshairFar_;
67            Ogre::SceneNode* chNearNode_;
68            Ogre::SceneNode* chFarNode_;
69
[643]70            float timeToReload_;
71            float reloadTime_;
72
[647]73            float maxSideAndBackSpeed_;
74            float maxSpeed_;
75            float maxRotation_;
76            float translationAcceleration_;
77            float rotationAcceleration_;
78            float translationDamping_;
79            float rotationDamping_;
80
81            Radian maxRotationRadian_;
82            Radian rotationAccelerationRadian_;
83            Radian rotationDampingRadian_;
84            Radian zeroRadian_;
85            Radian mouseXRotation_;
86            Radian mouseYRotation_;
87
88            float mouseX_;
89            float mouseY_;
90
[626]91            int emitterRate_;
[608]92    };
93}
94
[673]95#endif /* _SpaceShip_H__ */
Note: See TracBrowser for help on using the repository browser.