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 _OrxonoxExport 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 | void doNothing() { |
---|
47 | int a = 0; //FIXME unused var |
---|
48 | } |
---|
49 | |
---|
50 | |
---|
51 | private: |
---|
52 | bool bInvertYAxis_; |
---|
53 | bool setMouseEventCallback_; |
---|
54 | bool bLMousePressed_; |
---|
55 | bool bRMousePressed_; |
---|
56 | |
---|
57 | Ogre::SceneNode* camNode_; |
---|
58 | |
---|
59 | ParticleInterface* tt_; |
---|
60 | |
---|
61 | BillboardSet redBillboard_; |
---|
62 | BillboardSet greenBillboard_; |
---|
63 | Ogre::SceneNode* redNode_; |
---|
64 | Ogre::SceneNode* greenNode_; |
---|
65 | float blinkTime_; |
---|
66 | |
---|
67 | BillboardSet crosshairNear_; |
---|
68 | BillboardSet crosshairFar_; |
---|
69 | Ogre::SceneNode* chNearNode_; |
---|
70 | Ogre::SceneNode* chFarNode_; |
---|
71 | |
---|
72 | float timeToReload_; |
---|
73 | float reloadTime_; |
---|
74 | |
---|
75 | float maxSideAndBackSpeed_; |
---|
76 | float maxSpeed_; |
---|
77 | float maxRotation_; |
---|
78 | float translationAcceleration_; |
---|
79 | float rotationAcceleration_; |
---|
80 | float translationDamping_; |
---|
81 | float rotationDamping_; |
---|
82 | |
---|
83 | Radian maxRotationRadian_; |
---|
84 | Radian rotationAccelerationRadian_; |
---|
85 | Radian rotationDampingRadian_; |
---|
86 | Radian zeroRadian_; |
---|
87 | Radian mouseXRotation_; |
---|
88 | Radian mouseYRotation_; |
---|
89 | |
---|
90 | float mouseX_; |
---|
91 | float mouseY_; |
---|
92 | |
---|
93 | /* |
---|
94 | float moveForward_; |
---|
95 | float rotateUp_; |
---|
96 | float rotateDown_; |
---|
97 | float rotateRight_; |
---|
98 | float rotateLeft_; |
---|
99 | float loopRight_; |
---|
100 | float loopLeft_; |
---|
101 | float brakeForward_; |
---|
102 | float brakeRotate_; |
---|
103 | float brakeLoop_; |
---|
104 | |
---|
105 | float speedForward_; |
---|
106 | float speedRotateUpDown_; |
---|
107 | float speedRotateRightLeft_; |
---|
108 | float speedLoopRightLeft_; |
---|
109 | |
---|
110 | float maxSpeedForward_; |
---|
111 | float maxSpeedRotateUpDown_; |
---|
112 | float maxSpeedRotateRightLeft_; |
---|
113 | float maxSpeedLoopRightLeft_; |
---|
114 | |
---|
115 | float accelerationForward_; |
---|
116 | float accelerationRotateUpDown_; |
---|
117 | float accelerationRotateRightLeft_; |
---|
118 | float accelerationLoopRightLeft_; |
---|
119 | |
---|
120 | float speed; |
---|
121 | float rotate; |
---|
122 | float loop; |
---|
123 | float mouseY; |
---|
124 | float mouseX; |
---|
125 | float maxMouseX; |
---|
126 | float minMouseX; |
---|
127 | bool moved; |
---|
128 | */ |
---|
129 | int emitterRate_; |
---|
130 | }; |
---|
131 | ExportClass(SpaceShip, Orxonox); |
---|
132 | } |
---|
133 | |
---|
134 | #endif /* _SpaceShip_H__ */ |
---|