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