[608] | 1 | #ifndef _SpaceShip_H__ |
---|
| 2 | #define _SpaceShip_H__ |
---|
| 3 | |
---|
[708] | 4 | #include <OgrePrerequisites.h> |
---|
| 5 | #include <OIS/OISMouse.h> |
---|
[608] | 6 | |
---|
[708] | 7 | #include "../OrxonoxPrereqs.h" |
---|
| 8 | |
---|
[608] | 9 | #include "Model.h" |
---|
[768] | 10 | #include "../tools/BillboardSet.h" |
---|
[633] | 11 | |
---|
[708] | 12 | class TiXmlElement; // Forward declaration |
---|
[608] | 13 | |
---|
| 14 | namespace orxonox |
---|
| 15 | { |
---|
[708] | 16 | class ParticleInterface; // Forward declaration |
---|
| 17 | |
---|
[729] | 18 | class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener |
---|
[608] | 19 | { |
---|
| 20 | public: |
---|
| 21 | SpaceShip(); |
---|
| 22 | ~SpaceShip(); |
---|
[871] | 23 | void init(); |
---|
[697] | 24 | void setConfigValues(); |
---|
[608] | 25 | virtual void loadParams(TiXmlElement* xmlElem); |
---|
[871] | 26 | virtual void XMLPort(Element& xmlelement, bool loading); |
---|
[608] | 27 | virtual void tick(float dt); |
---|
[736] | 28 | |
---|
[871] | 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 | |
---|
[608] | 38 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
[643] | 39 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
| 40 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
[608] | 41 | |
---|
| 42 | |
---|
| 43 | private: |
---|
[786] | 44 | Vector3 testvector_; |
---|
[647] | 45 | bool bInvertYAxis_; |
---|
[608] | 46 | bool setMouseEventCallback_; |
---|
[644] | 47 | bool bLMousePressed_; |
---|
| 48 | bool bRMousePressed_; |
---|
[608] | 49 | |
---|
[644] | 50 | Ogre::SceneNode* camNode_; |
---|
| 51 | |
---|
[708] | 52 | ParticleInterface* tt_; |
---|
[608] | 53 | |
---|
[633] | 54 | BillboardSet redBillboard_; |
---|
| 55 | BillboardSet greenBillboard_; |
---|
| 56 | Ogre::SceneNode* redNode_; |
---|
| 57 | Ogre::SceneNode* greenNode_; |
---|
| 58 | float blinkTime_; |
---|
| 59 | |
---|
[661] | 60 | BillboardSet crosshairNear_; |
---|
| 61 | BillboardSet crosshairFar_; |
---|
| 62 | Ogre::SceneNode* chNearNode_; |
---|
| 63 | Ogre::SceneNode* chFarNode_; |
---|
| 64 | |
---|
[643] | 65 | float timeToReload_; |
---|
| 66 | float reloadTime_; |
---|
| 67 | |
---|
[647] | 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 | |
---|
[626] | 86 | int emitterRate_; |
---|
[608] | 87 | }; |
---|
| 88 | } |
---|
| 89 | |
---|
[673] | 90 | #endif /* _SpaceShip_H__ */ |
---|