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