Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/world_entities/space_ships/hover.h @ 9452

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

merged the presentation back

File size: 2.4 KB
Line 
1
2/*!
3 * @file hover.h
4 * Implements the Control of a Hover
5 */
6
7#ifndef _HOVER_H
8#define _HOVER_H
9
10//#include "sound_buffer.h"
11//#include "sound_source.h"
12
13#include "playable.h"
14
15class Hover : public Playable
16{
17  public:
18
19    Hover(const std::string& fileName);
20    Hover(const TiXmlElement* root = NULL);
21    virtual ~Hover();
22
23    virtual void loadParams(const TiXmlElement* root);
24    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f) {/* FIXME */};
25
26    virtual void enter();
27    virtual void leave();
28
29    virtual void postSpawn();
30    virtual void leftWorld();
31
32    virtual void collidesWith(WorldEntity* entity, const Vector& location);
33    virtual void tick(float dt);
34    virtual void draw() const;
35
36    virtual void process(const Event &event);
37
38  private:
39    void init();
40    void movement(float dt);
41
42  private:
43    bool                  bForward;           //!< forward button pressed.
44    bool                  bBackward;          //!< backward 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
50    int                   yInvert;
51    float                 mouseSensitivity;   //!< the mouse sensitivity
52
53    PNode                 wingNodeLeft;
54    PNode                 wingNodeRight;
55    PNode                 rotorNodeLeft;
56    PNode                 rotorNodeRight;
57
58    PNode                 cameraNode;
59    float                 cameraLook;
60    float                 rotation;
61
62    Vector                velocity;           //!< the velocity of the Hover.
63    Quaternion            direction;          //!< the direction of the Hover.
64    float                 travelSpeed;        //!< the current speed of the Hove (to make soft movement)
65    float                 acceleration;       //!< the acceleration of the Hover.
66    float                 airFriction;        //!< AirFriction.
67
68    float                 rotorSpeed;         //!< the speed of the rotor.
69    float                 rotorCycle;         //!< The Cycle the rotor is in.
70
71    float                 airViscosity;
72
73    WorldEntity*          hitEntity;
74
75    //OrxSound::SoundSource  soundSource;
76    //OrxSound::SoundBuffer* hoverBuffer;
77};
78
79#endif /* _HOVERS_H */
Note: See TracBrowser for help on using the repository browser.