[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" |
---|
[633] | 10 | #include "BillboardSet.h" |
---|
| 11 | |
---|
[708] | 12 | class TiXmlElement; // Forward declaration |
---|
[608] | 13 | |
---|
| 14 | namespace orxonox |
---|
| 15 | { |
---|
[708] | 16 | class ParticleInterface; // Forward declaration |
---|
| 17 | |
---|
[608] | 18 | class SpaceShip : public Model, public OIS::MouseListener |
---|
| 19 | { |
---|
| 20 | public: |
---|
| 21 | SpaceShip(); |
---|
| 22 | ~SpaceShip(); |
---|
[697] | 23 | void setConfigValues(); |
---|
[608] | 24 | virtual void loadParams(TiXmlElement* xmlElem); |
---|
| 25 | virtual void tick(float dt); |
---|
[647] | 26 | /* |
---|
[608] | 27 | void moveForward(float moveForward); |
---|
| 28 | void rotateUp(float rotateUp); |
---|
| 29 | void rotateDown(float rotateDown); |
---|
| 30 | void rotateRight(float rotateRight); |
---|
| 31 | void rotateLeft(float rotateLeft); |
---|
| 32 | void loopRight(float loopRight); |
---|
| 33 | void loopLeft(float loopLeft); |
---|
| 34 | void brakeForward(float brakeForward); |
---|
| 35 | void brakeRotate(float brakeRotate); |
---|
| 36 | void brakeLoop(float brakeLoop); |
---|
| 37 | void maxSpeedForward(float maxSpeedForward); |
---|
| 38 | void maxSpeedRotateUpDown(float maxSpeedRotateUpDown); |
---|
| 39 | void maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft); |
---|
| 40 | void maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft); |
---|
[647] | 41 | */ |
---|
[608] | 42 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
[643] | 43 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
| 44 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
[608] | 45 | |
---|
| 46 | |
---|
| 47 | private: |
---|
[647] | 48 | bool bInvertYAxis_; |
---|
[608] | 49 | bool setMouseEventCallback_; |
---|
[644] | 50 | bool bLMousePressed_; |
---|
| 51 | bool bRMousePressed_; |
---|
[608] | 52 | |
---|
[644] | 53 | Ogre::SceneNode* camNode_; |
---|
| 54 | |
---|
[708] | 55 | ParticleInterface* tt_; |
---|
[608] | 56 | |
---|
[633] | 57 | BillboardSet redBillboard_; |
---|
| 58 | BillboardSet greenBillboard_; |
---|
| 59 | Ogre::SceneNode* redNode_; |
---|
| 60 | Ogre::SceneNode* greenNode_; |
---|
| 61 | float blinkTime_; |
---|
| 62 | |
---|
[661] | 63 | BillboardSet crosshairNear_; |
---|
| 64 | BillboardSet crosshairFar_; |
---|
| 65 | Ogre::SceneNode* chNearNode_; |
---|
| 66 | Ogre::SceneNode* chFarNode_; |
---|
| 67 | |
---|
[643] | 68 | float timeToReload_; |
---|
| 69 | float reloadTime_; |
---|
| 70 | |
---|
[647] | 71 | float maxSideAndBackSpeed_; |
---|
| 72 | float maxSpeed_; |
---|
| 73 | float maxRotation_; |
---|
| 74 | float translationAcceleration_; |
---|
| 75 | float rotationAcceleration_; |
---|
| 76 | float translationDamping_; |
---|
| 77 | float rotationDamping_; |
---|
| 78 | |
---|
| 79 | Radian maxRotationRadian_; |
---|
| 80 | Radian rotationAccelerationRadian_; |
---|
| 81 | Radian rotationDampingRadian_; |
---|
| 82 | Radian zeroRadian_; |
---|
| 83 | Radian mouseXRotation_; |
---|
| 84 | Radian mouseYRotation_; |
---|
| 85 | |
---|
| 86 | float mouseX_; |
---|
| 87 | float mouseY_; |
---|
| 88 | |
---|
| 89 | /* |
---|
[608] | 90 | float moveForward_; |
---|
| 91 | float rotateUp_; |
---|
| 92 | float rotateDown_; |
---|
| 93 | float rotateRight_; |
---|
| 94 | float rotateLeft_; |
---|
| 95 | float loopRight_; |
---|
| 96 | float loopLeft_; |
---|
| 97 | float brakeForward_; |
---|
| 98 | float brakeRotate_; |
---|
| 99 | float brakeLoop_; |
---|
| 100 | |
---|
| 101 | float speedForward_; |
---|
| 102 | float speedRotateUpDown_; |
---|
| 103 | float speedRotateRightLeft_; |
---|
| 104 | float speedLoopRightLeft_; |
---|
| 105 | |
---|
| 106 | float maxSpeedForward_; |
---|
| 107 | float maxSpeedRotateUpDown_; |
---|
| 108 | float maxSpeedRotateRightLeft_; |
---|
| 109 | float maxSpeedLoopRightLeft_; |
---|
| 110 | |
---|
| 111 | float accelerationForward_; |
---|
| 112 | float accelerationRotateUpDown_; |
---|
| 113 | float accelerationRotateRightLeft_; |
---|
| 114 | float accelerationLoopRightLeft_; |
---|
| 115 | |
---|
| 116 | float speed; |
---|
| 117 | float rotate; |
---|
| 118 | float loop; |
---|
| 119 | float mouseY; |
---|
| 120 | float mouseX; |
---|
| 121 | float maxMouseX; |
---|
| 122 | float minMouseX; |
---|
| 123 | bool moved; |
---|
[647] | 124 | */ |
---|
[626] | 125 | int emitterRate_; |
---|
[608] | 126 | }; |
---|
| 127 | } |
---|
| 128 | |
---|
[673] | 129 | #endif /* _SpaceShip_H__ */ |
---|