[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 | |
---|
[608] | 12 | namespace orxonox |
---|
| 13 | { |
---|
[729] | 14 | class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener |
---|
[608] | 15 | { |
---|
| 16 | public: |
---|
| 17 | SpaceShip(); |
---|
| 18 | ~SpaceShip(); |
---|
[927] | 19 | bool create(); |
---|
| 20 | void registerAllVariables(); |
---|
[871] | 21 | void init(); |
---|
[697] | 22 | void setConfigValues(); |
---|
[608] | 23 | virtual void loadParams(TiXmlElement* xmlElem); |
---|
[871] | 24 | virtual void XMLPort(Element& xmlelement, bool loading); |
---|
[608] | 25 | virtual void tick(float dt); |
---|
[736] | 26 | |
---|
[871] | 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 | |
---|
[608] | 36 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
[643] | 37 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
| 38 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
[608] | 39 | |
---|
| 40 | |
---|
| 41 | private: |
---|
[786] | 42 | Vector3 testvector_; |
---|
[647] | 43 | bool bInvertYAxis_; |
---|
[608] | 44 | bool setMouseEventCallback_; |
---|
[644] | 45 | bool bLMousePressed_; |
---|
| 46 | bool bRMousePressed_; |
---|
[608] | 47 | |
---|
[644] | 48 | Ogre::SceneNode* camNode_; |
---|
| 49 | |
---|
[708] | 50 | ParticleInterface* tt_; |
---|
[608] | 51 | |
---|
[633] | 52 | BillboardSet redBillboard_; |
---|
| 53 | BillboardSet greenBillboard_; |
---|
| 54 | Ogre::SceneNode* redNode_; |
---|
| 55 | Ogre::SceneNode* greenNode_; |
---|
| 56 | float blinkTime_; |
---|
| 57 | |
---|
[661] | 58 | BillboardSet crosshairNear_; |
---|
| 59 | BillboardSet crosshairFar_; |
---|
| 60 | Ogre::SceneNode* chNearNode_; |
---|
| 61 | Ogre::SceneNode* chFarNode_; |
---|
| 62 | |
---|
[643] | 63 | float timeToReload_; |
---|
| 64 | float reloadTime_; |
---|
| 65 | |
---|
[647] | 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 | |
---|
[626] | 84 | int emitterRate_; |
---|
[608] | 85 | }; |
---|
| 86 | } |
---|
| 87 | |
---|
[673] | 88 | #endif /* _SpaceShip_H__ */ |
---|