Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/space_ships/helicopter.h @ 6947

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

orxonox/trunk: merged the controll back

File size: 2.6 KB
RevLine 
[5996]1
2/*!
[6002]3 * @file helicopter.h
4 * Implements the Control of a Helicopter
[5996]5 */
6
[6002]7#ifndef _HELICOPTER_H
8#define _HELICOPTER_H
[5996]9
10#include "playable.h"
11
12
[6002]13class Helicopter : public Playable
[5996]14{
15
16  public:
17
[6002]18    Helicopter();
19    Helicopter(const char* fileName);
20    Helicopter(const TiXmlElement* root);
21    virtual ~Helicopter();
[5996]22
[6512]23    virtual void loadParams(const TiXmlElement* root);
[5996]24
[6222]25    virtual void enter();
26    virtual void leave();
27
[5996]28    virtual void postSpawn();
29    virtual void leftWorld();
30
31    virtual void collidesWith(WorldEntity* entity, const Vector& location);
32    virtual void tick(float time);
[6005]33    virtual void draw() const;
[5996]34
35    virtual void process(const Event &event);
36
37
38
39  private:
[6804]40    void init();
[5996]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
[6637]55    int                   yInvert;
[5996]56    float                 mouseSensitivity;   //!< the mouse sensitivity
[6947]57    int                   controlVelocityX;   //!< defines max velocity of Xaxis of mousecontrol
58    int                   controlVelocityY;   //!< defines max velocity of Yaxis of mousecontrol
[6804]59
[6947]60    PNode                 topRotor;           //!< the position of the toprotor
61    PNode                 tailRotor;          //!< the position of the tailrotor
[6804]62
[6947]63    PNode                 cameraNode;         //!< the position the camera is locked at (used to look up and down without turning the helicopter)
[5996]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.
[6222]69
[6162]70    float                 airViscosity;
[5996]71
72};
73
[6002]74#endif /* _HELICOPTERS_H */
Note: See TracBrowser for help on using the repository browser.