Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/space_ships/turbine_hover.h @ 7898

Last change on this file since 7898 was 7348, checked in by bensch, 19 years ago

orxonox/trunk: new Quaternion Functionality. Also added <abs-dir> to TurbineHover

File size: 2.4 KB
Line 
1
2/*!
3 * @file turbine_hover.h
4 * Implements the Control of a TurbineHover
5 */
6
7#ifndef _TURBINE_HOVER_H
8#define _TURBINE_HOVER_H
9
10#include "playable.h"
11
12// Forward Declaration
13class ParticleEmitter;
14class ParticleSystem;
15
16class TurbineHover : public Playable
17{
18  public:
19    TurbineHover(const std::string& fileName);
20    TurbineHover(const TiXmlElement* root = NULL);
21    virtual ~TurbineHover();
22
23    virtual void loadParams(const TiXmlElement* root);
24    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
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 dt);
33    virtual void draw() const;
34
35    virtual void process(const Event &event);
36
37  private:
38    void init();
39    void movement(float dt);
40
41  private:
42    bool                  bForward;           //!< forward button pressed.
43    bool                  bBackward;          //!< backward button pressed.
44    bool                  bLeft;              //!< left button pressed.
45    bool                  bRight;             //!< right button pressed.
46    bool                  bAscend;            //!< ascend button pressed.
47    bool                  bDescend;           //!< descend button presses.
48
49    int                   yInvert;
50    float                 mouseSensitivity;   //!< the mouse sensitivity
51
52    PNode                 wingNodeLeft;
53    PNode                 wingNodeRight;
54    PNode                 rotorNodeLeft;
55    PNode                 rotorNodeRight;
56
57    PNode                 cameraNode;
58    float                 cameraLook;
59    float                 rotation;
60
61    Vector                velocity;           //!< the velocity of the TurbineHover.
62    Quaternion            direction;          //!< the direction of the TurbineHover.
63    float                 travelSpeed;        //!< the current speed of the Hove (to make soft movement)
64    float                 acceleration;       //!< the acceleration of the TurbineHover.
65    float                 airFriction;        //!< AirFriction.
66
67    float                 rotorSpeed;         //!< the speed of the rotor.
68    float                 rotorCycle;         //!< The Cycle the rotor is in.
69
70    float                 airViscosity;
71
72    ParticleEmitter*      burstEmitter[2];
73    ParticleSystem*       burstSystem;
74};
75
76#endif /* _TURBINE_HOVERS_H */
Note: See TracBrowser for help on using the repository browser.