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 | virtual void tick(float dt); |
---|
22 | /* |
---|
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 | */ |
---|
38 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
39 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
40 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
41 | |
---|
42 | |
---|
43 | private: |
---|
44 | bool bInvertYAxis_; |
---|
45 | bool setMouseEventCallback_; |
---|
46 | bool bLMousePressed_; |
---|
47 | bool bRMousePressed_; |
---|
48 | |
---|
49 | Ogre::SceneNode* camNode_; |
---|
50 | |
---|
51 | particle::ParticleInterface* tt_; |
---|
52 | |
---|
53 | BillboardSet redBillboard_; |
---|
54 | BillboardSet greenBillboard_; |
---|
55 | Ogre::SceneNode* redNode_; |
---|
56 | Ogre::SceneNode* greenNode_; |
---|
57 | float blinkTime_; |
---|
58 | |
---|
59 | BillboardSet crosshairNear_; |
---|
60 | BillboardSet crosshairFar_; |
---|
61 | Ogre::SceneNode* chNearNode_; |
---|
62 | Ogre::SceneNode* chFarNode_; |
---|
63 | |
---|
64 | float timeToReload_; |
---|
65 | float reloadTime_; |
---|
66 | |
---|
67 | float maxSideAndBackSpeed_; |
---|
68 | float maxSpeed_; |
---|
69 | float maxRotation_; |
---|
70 | float translationAcceleration_; |
---|
71 | float rotationAcceleration_; |
---|
72 | float translationDamping_; |
---|
73 | float rotationDamping_; |
---|
74 | |
---|
75 | Radian maxRotationRadian_; |
---|
76 | Radian rotationAccelerationRadian_; |
---|
77 | Radian rotationDampingRadian_; |
---|
78 | Radian zeroRadian_; |
---|
79 | Radian mouseXRotation_; |
---|
80 | Radian mouseYRotation_; |
---|
81 | |
---|
82 | float mouseX_; |
---|
83 | float mouseY_; |
---|
84 | |
---|
85 | /* |
---|
86 | float moveForward_; |
---|
87 | float rotateUp_; |
---|
88 | float rotateDown_; |
---|
89 | float rotateRight_; |
---|
90 | float rotateLeft_; |
---|
91 | float loopRight_; |
---|
92 | float loopLeft_; |
---|
93 | float brakeForward_; |
---|
94 | float brakeRotate_; |
---|
95 | float brakeLoop_; |
---|
96 | |
---|
97 | float speedForward_; |
---|
98 | float speedRotateUpDown_; |
---|
99 | float speedRotateRightLeft_; |
---|
100 | float speedLoopRightLeft_; |
---|
101 | |
---|
102 | float maxSpeedForward_; |
---|
103 | float maxSpeedRotateUpDown_; |
---|
104 | float maxSpeedRotateRightLeft_; |
---|
105 | float maxSpeedLoopRightLeft_; |
---|
106 | |
---|
107 | float accelerationForward_; |
---|
108 | float accelerationRotateUpDown_; |
---|
109 | float accelerationRotateRightLeft_; |
---|
110 | float accelerationLoopRightLeft_; |
---|
111 | |
---|
112 | float speed; |
---|
113 | float rotate; |
---|
114 | float loop; |
---|
115 | float mouseY; |
---|
116 | float mouseX; |
---|
117 | float maxMouseX; |
---|
118 | float minMouseX; |
---|
119 | bool moved; |
---|
120 | */ |
---|
121 | int emitterRate_; |
---|
122 | }; |
---|
123 | } |
---|
124 | |
---|
125 | #endif |
---|