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