[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(); |
---|
[927] | 23 | bool create(); |
---|
| 24 | void registerAllVariables(); |
---|
[871] | 25 | void init(); |
---|
[697] | 26 | void setConfigValues(); |
---|
[608] | 27 | virtual void loadParams(TiXmlElement* xmlElem); |
---|
[871] | 28 | virtual void XMLPort(Element& xmlelement, bool loading); |
---|
[608] | 29 | virtual void tick(float dt); |
---|
[736] | 30 | |
---|
[871] | 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 | |
---|
[608] | 40 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
[643] | 41 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
| 42 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
[608] | 43 | |
---|
| 44 | |
---|
| 45 | private: |
---|
[786] | 46 | Vector3 testvector_; |
---|
[647] | 47 | bool bInvertYAxis_; |
---|
[608] | 48 | bool setMouseEventCallback_; |
---|
[644] | 49 | bool bLMousePressed_; |
---|
| 50 | bool bRMousePressed_; |
---|
[608] | 51 | |
---|
[644] | 52 | Ogre::SceneNode* camNode_; |
---|
| 53 | |
---|
[708] | 54 | ParticleInterface* tt_; |
---|
[608] | 55 | |
---|
[633] | 56 | BillboardSet redBillboard_; |
---|
| 57 | BillboardSet greenBillboard_; |
---|
| 58 | Ogre::SceneNode* redNode_; |
---|
| 59 | Ogre::SceneNode* greenNode_; |
---|
| 60 | float blinkTime_; |
---|
| 61 | |
---|
[661] | 62 | BillboardSet crosshairNear_; |
---|
| 63 | BillboardSet crosshairFar_; |
---|
| 64 | Ogre::SceneNode* chNearNode_; |
---|
| 65 | Ogre::SceneNode* chFarNode_; |
---|
| 66 | |
---|
[643] | 67 | float timeToReload_; |
---|
| 68 | float reloadTime_; |
---|
| 69 | |
---|
[647] | 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 | |
---|
[626] | 88 | int emitterRate_; |
---|
[608] | 89 | }; |
---|
| 90 | } |
---|
| 91 | |
---|
[673] | 92 | #endif /* _SpaceShip_H__ */ |
---|