Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

trunk: hover-rotors

File size: 2.3 KB
RevLine 
[5996]1
2/*!
[6799]3 * @file hover.h
4 * Implements the Control of a Hover
[5996]5 */
6
[6799]7#ifndef _HOVER_H
8#define _HOVER_H
[5996]9
10#include "playable.h"
11
[6799]12class Hover : public Playable
[5996]13{
14  public:
15
[6799]16    Hover(const char* fileName);
[6803]17    Hover(const TiXmlElement* root = NULL);
[6799]18    virtual ~Hover();
[5996]19
[6512]20    virtual void loadParams(const TiXmlElement* root);
[5996]21
[6222]22    virtual void enter();
23    virtual void leave();
[6724]24    virtual void attachCamera();
[6222]25
[5996]26    virtual void postSpawn();
27    virtual void leftWorld();
28
29    virtual void collidesWith(WorldEntity* entity, const Vector& location);
[6806]30    virtual void tick(float dt);
[6005]31    virtual void draw() const;
[5996]32
33    virtual void process(const Event &event);
34
35  private:
[6803]36    void init();
[6806]37    void movement(float dt);
[6803]38
39  private:
[6805]40    bool                  bForward;           //!< forward button pressed.
41    bool                  bBackward;          //!< backward button pressed.
[5996]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    float                 xMouse;             //!< mouse moved in x-Direction
48    float                 yMouse;             //!< mouse moved in y-Direction
[6637]49    int                   yInvert;
[5996]50    float                 mouseSensitivity;   //!< the mouse sensitivity
[6724]51    int                   controlVelocityX;
52    int                   controlVelocityY;
[6637]53    //float                 cycle;              //!< hovercycle
[6799]54
[6800]55    PNode                 wingNodeLeft;
56    PNode                 wingNodeRight;
57    PNode                 rotorNodeLeft;
58    PNode                 rotorNodeRight;
[6799]59
[6724]60    PNode                 cameraNode;
[5996]61
[6805]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.
[6222]66
[6806]67    float                 rotorSpeed;         //!< the speed of the rotor.
68    float                 rotorCycle;         //!< The Cycle the rotor is in.
69
[6162]70    float                 airViscosity;
[5996]71
72};
73
[6799]74#endif /* _HOVERS_H */
Note: See TracBrowser for help on using the repository browser.