1 | #ifndef _SpaceShip_H__ |
---|
2 | #define _SpaceShip_H__ |
---|
3 | |
---|
4 | #include <OIS/OIS.h> |
---|
5 | |
---|
6 | #include "Model.h" |
---|
7 | #include "BillboardSet.h" |
---|
8 | #include "OgreSceneNode.h" |
---|
9 | |
---|
10 | #include "../../tinyxml/tinyxml.h" |
---|
11 | #include "../particle/ParticleInterface.h" |
---|
12 | |
---|
13 | namespace orxonox |
---|
14 | { |
---|
15 | class SpaceShip : public Model, public OIS::MouseListener |
---|
16 | { |
---|
17 | public: |
---|
18 | SpaceShip(); |
---|
19 | ~SpaceShip(); |
---|
20 | virtual void loadParams(TiXmlElement* xmlElem); |
---|
21 | void setMaxSpeedValues(float maxSpeedForward, float maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft); |
---|
22 | virtual void tick(float dt); |
---|
23 | void moveForward(float moveForward); |
---|
24 | void rotateUp(float rotateUp); |
---|
25 | void rotateDown(float rotateDown); |
---|
26 | void rotateRight(float rotateRight); |
---|
27 | void rotateLeft(float rotateLeft); |
---|
28 | void loopRight(float loopRight); |
---|
29 | void loopLeft(float loopLeft); |
---|
30 | void brakeForward(float brakeForward); |
---|
31 | void brakeRotate(float brakeRotate); |
---|
32 | void brakeLoop(float brakeLoop); |
---|
33 | void maxSpeedForward(float maxSpeedForward); |
---|
34 | void maxSpeedRotateUpDown(float maxSpeedRotateUpDown); |
---|
35 | void maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft); |
---|
36 | void maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft); |
---|
37 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
38 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id) { return true; } |
---|
39 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id) { return true; } |
---|
40 | |
---|
41 | |
---|
42 | private: |
---|
43 | bool bInvertMouse_; |
---|
44 | bool setMouseEventCallback_; |
---|
45 | |
---|
46 | particle::ParticleInterface *tt_; |
---|
47 | |
---|
48 | BillboardSet redBillboard_; |
---|
49 | BillboardSet greenBillboard_; |
---|
50 | Ogre::SceneNode* redNode_; |
---|
51 | Ogre::SceneNode* greenNode_; |
---|
52 | float blinkTime_; |
---|
53 | |
---|
54 | float moveForward_; |
---|
55 | float rotateUp_; |
---|
56 | float rotateDown_; |
---|
57 | float rotateRight_; |
---|
58 | float rotateLeft_; |
---|
59 | float loopRight_; |
---|
60 | float loopLeft_; |
---|
61 | float brakeForward_; |
---|
62 | float brakeRotate_; |
---|
63 | float brakeLoop_; |
---|
64 | |
---|
65 | float speedForward_; |
---|
66 | float speedRotateUpDown_; |
---|
67 | float speedRotateRightLeft_; |
---|
68 | float speedLoopRightLeft_; |
---|
69 | |
---|
70 | float maxSpeedForward_; |
---|
71 | float maxSpeedRotateUpDown_; |
---|
72 | float maxSpeedRotateRightLeft_; |
---|
73 | float maxSpeedLoopRightLeft_; |
---|
74 | |
---|
75 | float accelerationForward_; |
---|
76 | float accelerationRotateUpDown_; |
---|
77 | float accelerationRotateRightLeft_; |
---|
78 | float accelerationLoopRightLeft_; |
---|
79 | |
---|
80 | float speed; |
---|
81 | float rotate; |
---|
82 | float loop; |
---|
83 | float mouseY; |
---|
84 | float mouseX; |
---|
85 | float maxMouseX; |
---|
86 | float minMouseX; |
---|
87 | bool moved; |
---|
88 | |
---|
89 | int emitterRate_; |
---|
90 | }; |
---|
91 | } |
---|
92 | |
---|
93 | #endif |
---|