Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7951 was 7810, checked in by bensch, 19 years ago

orxonox/trunk: merged the Weather effects back here

File size: 2.8 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#include "sound_buffer.h"
13#include "sound_source.h"
14
15class Helicopter : public Playable
16{
17
18  public:
19
20    Helicopter();
21    Helicopter(const std::string& fileName);
22    Helicopter(const TiXmlElement* root);
23    virtual ~Helicopter();
24
25    virtual void loadParams(const TiXmlElement* root);
26    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f) {/* FIXME */};
27
28    virtual void enter();
29    virtual void leave();
30
31    virtual void postSpawn();
32    virtual void leftWorld();
33
34    virtual void collidesWith(WorldEntity* entity, const Vector& location);
35    virtual void tick(float time);
36    virtual void draw() const;
37
38    virtual void process(const Event &event);
39
40
41
42  private:
43    void init();
44    void calculateVelocity(float time);
45
46    bool                  bUp;                //!< up button pressed.
47    bool                  bDown;              //!< down button pressed.
48    bool                  bLeft;              //!< left button pressed.
49    bool                  bRight;             //!< right button pressed.
50    bool                  bAscend;            //!< ascend button pressed.
51    bool                  bDescend;           //!< descend button presses.
52    bool                  bFire;              //!< fire button pressed.
53    bool                  bRollL;             //!< rolling button pressed (left)
54    bool                  bRollR;             //!< rolling button pressed (right)
55
56    float                 xMouse;             //!< mouse moved in x-Direction
57    float                 yMouse;             //!< mouse moved in y-Direction
58    int                   yInvert;
59    float                 mouseSensitivity;   //!< the mouse sensitivity
60    int                   controlVelocityX;   //!< defines max velocity of Xaxis of mousecontrol
61    int                   controlVelocityY;   //!< defines max velocity of Yaxis of mousecontrol
62
63    PNode                 topRotor;           //!< the position of the toprotor
64    PNode                 tailRotor;          //!< the position of the tailrotor
65
66    PNode                 cameraNode;         //!< the position the camera is locked at (used to look up and down without turning the helicopter)
67
68    Vector                velocity;           //!< the velocity of the player.
69    Vector                velocityDir;        //!< the direction of the velocity of the spaceship
70    float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
71    float                 acceleration;       //!< the acceleration of the player.
72
73    float                 airViscosity;
74
75    OrxSound::SoundSource soundSource;
76    OrxSound::SoundBuffer*chopperBuffer;
77
78};
79
80#endif /* _HELICOPTERS_H */
Note: See TracBrowser for help on using the repository browser.