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 "../tools/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 init(); |
---|
24 | void setConfigValues(); |
---|
25 | virtual void loadParams(TiXmlElement* xmlElem); |
---|
26 | virtual void XMLPort(Element& xmlelement, bool loading); |
---|
27 | virtual void tick(float dt); |
---|
28 | |
---|
29 | void setCamera(const std::string& camera = ""); |
---|
30 | void setMaxSpeed(float value); |
---|
31 | void setMaxSideAndBackSpeed(float value); |
---|
32 | void setMaxRotation(float value); |
---|
33 | void setTransAcc(float value); |
---|
34 | void setRotAcc(float value); |
---|
35 | void setTransDamp(float value); |
---|
36 | void setRotDamp(float value); |
---|
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 | Vector3 testvector_; |
---|
45 | bool bInvertYAxis_; |
---|
46 | bool setMouseEventCallback_; |
---|
47 | bool bLMousePressed_; |
---|
48 | bool bRMousePressed_; |
---|
49 | |
---|
50 | Ogre::SceneNode* camNode_; |
---|
51 | |
---|
52 | 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 | int emitterRate_; |
---|
87 | }; |
---|
88 | } |
---|
89 | |
---|
90 | #endif /* _SpaceShip_H__ */ |
---|