Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/spaceshipcontrol/src/world_entities/space_ships/helicopter.h @ 6717

Last change on this file since 6717 was 6717, checked in by bknecht, 18 years ago

Control: Helicopter cameranode

File size: 2.6 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
13class Helicopter : public Playable
14{
15
16  public:
17
18    Helicopter();
19    Helicopter(const char* fileName);
20    Helicopter(const TiXmlElement* root);
21    virtual ~Helicopter();
22
23    void init();
24    virtual void loadParams(const TiXmlElement* root);
25
26    virtual void enter();
27    virtual void leave();
28    virtual void attachCamera();
29
30    virtual void postSpawn();
31    virtual void leftWorld();
32
33    virtual void collidesWith(WorldEntity* entity, const Vector& location);
34    virtual void tick(float time);
35    virtual void draw() const;
36
37    virtual void process(const Event &event);
38
39
40
41  private:
42    void calculateVelocity(float time);
43    void weaponAction();
44
45    // !! temporary !!
46    void ADDWEAPON();
47
48    bool                  bUp;                //!< up button pressed.
49    bool                  bDown;              //!< down button pressed.
50    bool                  bLeft;              //!< left button pressed.
51    bool                  bRight;             //!< right button pressed.
52    bool                  bAscend;            //!< ascend button pressed.
53    bool                  bDescend;           //!< descend button presses.
54    bool                  bFire;              //!< fire button pressed.
55    bool                  bRollL;             //!< rolling button pressed (left)
56    bool                  bRollR;             //!< rolling button pressed (right)
57
58    float                 xMouse;             //!< mouse moved in x-Direction
59    float                 yMouse;             //!< mouse moved in y-Direction
60    int                   yInvert;
61    float                 mouseSensitivity;   //!< the mouse sensitivity
62    int                   controlVelocityX;
63    int                   controlVelocityY;
64    //float                 cycle;              //!< hovercycle
65   
66    PNode                 topRotor;
67    PNode                 tailRotor;
68   
69    PNode                 cameraNode;
70
71    Vector                velocity;           //!< the velocity of the player.
72    Vector                velocityDir;        //!< the direction of the velocity of the spaceship
73    float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
74    float                 acceleration;       //!< the acceleration of the player.
75    //float                 rotorspeed;         //!< the speed of the rotor.
76    //float                 tailrotorspeed;     //!< the relativ speed ot the tail rotor
77
78    float                 airViscosity;
79
80};
81
82#endif /* _HELICOPTERS_H */
Note: See TracBrowser for help on using the repository browser.