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 | bool create(); |
---|
24 | void registerAllVariables(); |
---|
25 | void init(); |
---|
26 | void setConfigValues(); |
---|
27 | virtual void loadParams(TiXmlElement* xmlElem); |
---|
28 | virtual void XMLPort(Element& xmlelement, bool loading); |
---|
29 | virtual void tick(float dt); |
---|
30 | |
---|
31 | void setCamera(const std::string& camera = ""); |
---|
32 | void setMaxSpeed(float value); |
---|
33 | void setMaxSideAndBackSpeed(float value); |
---|
34 | void setMaxRotation(float value); |
---|
35 | void setTransAcc(float value); |
---|
36 | void setRotAcc(float value); |
---|
37 | void setTransDamp(float value); |
---|
38 | void setRotDamp(float value); |
---|
39 | |
---|
40 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
41 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
42 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
43 | |
---|
44 | |
---|
45 | private: |
---|
46 | Vector3 testvector_; |
---|
47 | bool bInvertYAxis_; |
---|
48 | bool setMouseEventCallback_; |
---|
49 | bool bLMousePressed_; |
---|
50 | bool bRMousePressed_; |
---|
51 | |
---|
52 | Ogre::SceneNode* camNode_; |
---|
53 | |
---|
54 | ParticleInterface* tt_; |
---|
55 | |
---|
56 | BillboardSet redBillboard_; |
---|
57 | BillboardSet greenBillboard_; |
---|
58 | Ogre::SceneNode* redNode_; |
---|
59 | Ogre::SceneNode* greenNode_; |
---|
60 | float blinkTime_; |
---|
61 | |
---|
62 | BillboardSet crosshairNear_; |
---|
63 | BillboardSet crosshairFar_; |
---|
64 | Ogre::SceneNode* chNearNode_; |
---|
65 | Ogre::SceneNode* chFarNode_; |
---|
66 | |
---|
67 | float timeToReload_; |
---|
68 | float reloadTime_; |
---|
69 | |
---|
70 | float maxSideAndBackSpeed_; |
---|
71 | float maxSpeed_; |
---|
72 | float maxRotation_; |
---|
73 | float translationAcceleration_; |
---|
74 | float rotationAcceleration_; |
---|
75 | float translationDamping_; |
---|
76 | float rotationDamping_; |
---|
77 | |
---|
78 | Radian maxRotationRadian_; |
---|
79 | Radian rotationAccelerationRadian_; |
---|
80 | Radian rotationDampingRadian_; |
---|
81 | Radian zeroRadian_; |
---|
82 | Radian mouseXRotation_; |
---|
83 | Radian mouseYRotation_; |
---|
84 | |
---|
85 | float mouseX_; |
---|
86 | float mouseY_; |
---|
87 | |
---|
88 | int emitterRate_; |
---|
89 | }; |
---|
90 | } |
---|
91 | |
---|
92 | #endif /* _SpaceShip_H__ */ |
---|