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 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
28 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
29 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
30 | |
---|
31 | |
---|
32 | private: |
---|
33 | bool bInvertYAxis_; |
---|
34 | bool setMouseEventCallback_; |
---|
35 | bool bLMousePressed_; |
---|
36 | bool bRMousePressed_; |
---|
37 | |
---|
38 | Ogre::SceneNode* camNode_; |
---|
39 | |
---|
40 | ParticleInterface* tt_; |
---|
41 | |
---|
42 | BillboardSet redBillboard_; |
---|
43 | BillboardSet greenBillboard_; |
---|
44 | Ogre::SceneNode* redNode_; |
---|
45 | Ogre::SceneNode* greenNode_; |
---|
46 | float blinkTime_; |
---|
47 | |
---|
48 | BillboardSet crosshairNear_; |
---|
49 | BillboardSet crosshairFar_; |
---|
50 | Ogre::SceneNode* chNearNode_; |
---|
51 | Ogre::SceneNode* chFarNode_; |
---|
52 | |
---|
53 | float timeToReload_; |
---|
54 | float reloadTime_; |
---|
55 | |
---|
56 | float maxSideAndBackSpeed_; |
---|
57 | float maxSpeed_; |
---|
58 | float maxRotation_; |
---|
59 | float translationAcceleration_; |
---|
60 | float rotationAcceleration_; |
---|
61 | float translationDamping_; |
---|
62 | float rotationDamping_; |
---|
63 | |
---|
64 | Radian maxRotationRadian_; |
---|
65 | Radian rotationAccelerationRadian_; |
---|
66 | Radian rotationDampingRadian_; |
---|
67 | Radian zeroRadian_; |
---|
68 | Radian mouseXRotation_; |
---|
69 | Radian mouseYRotation_; |
---|
70 | |
---|
71 | float mouseX_; |
---|
72 | float mouseY_; |
---|
73 | |
---|
74 | int emitterRate_; |
---|
75 | }; |
---|
76 | ExportClass(SpaceShip, Orxonox); |
---|
77 | } |
---|
78 | |
---|
79 | #endif /* _SpaceShip_H__ */ |
---|