Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/osX/src/world_entities/space_ships/helicopter.h @ 7278

Last change on this file since 7278 was 6947, checked in by bensch, 19 years ago

orxonox/trunk: merged the controll back

File size: 2.6 KB
Line 
1
2/*!
3 * @file helicopter.h
4 * Implements the Control of a Helicopter
5 */
6
7#ifndef _HELICOPTER_H
8#define _HELICOPTER_H
9
10#include "playable.h"
11
12
13class Helicopter : public Playable
14{
15
16  public:
17
18    Helicopter();
19    Helicopter(const char* fileName);
20    Helicopter(const TiXmlElement* root);
21    virtual ~Helicopter();
22
23    virtual void loadParams(const TiXmlElement* root);
24
25    virtual void enter();
26    virtual void leave();
27
28    virtual void postSpawn();
29    virtual void leftWorld();
30
31    virtual void collidesWith(WorldEntity* entity, const Vector& location);
32    virtual void tick(float time);
33    virtual void draw() const;
34
35    virtual void process(const Event &event);
36
37
38
39  private:
40    void init();
41    void calculateVelocity(float time);
42
43    bool                  bUp;                //!< up button pressed.
44    bool                  bDown;              //!< down button pressed.
45    bool                  bLeft;              //!< left button pressed.
46    bool                  bRight;             //!< right button pressed.
47    bool                  bAscend;            //!< ascend button pressed.
48    bool                  bDescend;           //!< descend button presses.
49    bool                  bFire;              //!< fire button pressed.
50    bool                  bRollL;             //!< rolling button pressed (left)
51    bool                  bRollR;             //!< rolling button pressed (right)
52
53    float                 xMouse;             //!< mouse moved in x-Direction
54    float                 yMouse;             //!< mouse moved in y-Direction
55    int                   yInvert;
56    float                 mouseSensitivity;   //!< the mouse sensitivity
57    int                   controlVelocityX;   //!< defines max velocity of Xaxis of mousecontrol
58    int                   controlVelocityY;   //!< defines max velocity of Yaxis of mousecontrol
59
60    PNode                 topRotor;           //!< the position of the toprotor
61    PNode                 tailRotor;          //!< the position of the tailrotor
62
63    PNode                 cameraNode;         //!< the position the camera is locked at (used to look up and down without turning the helicopter)
64
65    Vector                velocity;           //!< the velocity of the player.
66    Vector                velocityDir;        //!< the direction of the velocity of the spaceship
67    float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
68    float                 acceleration;       //!< the acceleration of the player.
69
70    float                 airViscosity;
71
72};
73
74#endif /* _HELICOPTERS_H */
Note: See TracBrowser for help on using the repository browser.