Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/space_ships/hover.h @ 7092

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

absDir

File size: 2.2 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 "playable.h"
11
12class Hover : public Playable
13{
14  public:
15
16    Hover(const char* fileName);
17    Hover(const TiXmlElement* root = NULL);
18    virtual ~Hover();
19
20    virtual void loadParams(const TiXmlElement* root);
21    virtual void setAbsDirPlay(const Quaternion& rot) {/* FIXME */};
22
23    virtual void enter();
24    virtual void leave();
25
26    virtual void postSpawn();
27    virtual void leftWorld();
28
29    virtual void collidesWith(WorldEntity* entity, const Vector& location);
30    virtual void tick(float dt);
31    virtual void draw() const;
32
33    virtual void process(const Event &event);
34
35  private:
36    void init();
37    void movement(float dt);
38
39  private:
40    bool                  bForward;           //!< forward button pressed.
41    bool                  bBackward;          //!< backward button pressed.
42    bool                  bLeft;              //!< left button pressed.
43    bool                  bRight;             //!< right button pressed.
44    bool                  bAscend;            //!< ascend button pressed.
45    bool                  bDescend;           //!< descend button presses.
46
47    int                   yInvert;
48    float                 mouseSensitivity;   //!< the mouse sensitivity
49
50    PNode                 wingNodeLeft;
51    PNode                 wingNodeRight;
52    PNode                 rotorNodeLeft;
53    PNode                 rotorNodeRight;
54
55    PNode                 cameraNode;
56    float                 cameraLook;
57    float                 rotation;
58
59    Vector                velocity;           //!< the velocity of the Hover.
60    Quaternion            direction;          //!< the direction of the Hover.
61    float                 travelSpeed;        //!< the current speed of the Hove (to make soft movement)
62    float                 acceleration;       //!< the acceleration of the Hover.
63    float                 airFriction;        //!< AirFriction.
64
65    float                 rotorSpeed;         //!< the speed of the rotor.
66    float                 rotorCycle;         //!< The Cycle the rotor is in.
67
68    float                 airViscosity;
69
70    WorldEntity* hitEntity;
71};
72
73#endif /* _HOVERS_H */
Note: See TracBrowser for help on using the repository browser.