Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/christmas_branche/src/world_entities/creatures/md2_creature.h @ 6206

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

christmas: split control to X and Y

File size: 2.7 KB
Line 
1/*!
2 * @file md2_creature.h
3 * Implements the control of a md2 model
4 */
5
6#ifndef _MD2_CREATURE_H
7#define _MD2_CREATURE_H
8
9#include "playable.h"
10
11
12template<class T> class tList;
13class Vector;
14class Event;
15
16class MD2Creature : public Playable
17{
18
19  public:
20
21    MD2Creature();
22    MD2Creature(const char* fileName);
23    MD2Creature(const TiXmlElement* root);
24    virtual ~MD2Creature();
25
26    void init();
27    void loadParams(const TiXmlElement* root);
28
29    void addWeapon(Weapon* weapon );
30    void removeWeapon(Weapon* weapon);
31
32    virtual void postSpawn();
33    virtual void leftWorld();
34
35    virtual void collidesWith(WorldEntity* entity, const Vector& location);
36    virtual void tick(float time);
37    virtual void draw() const;
38
39    virtual void process(const Event &event);
40
41
42
43  private:
44
45    void calculateVelocity(float time);
46    void weaponAction();
47
48    // !! temporary !!
49    void ADDWEAPON();
50
51    bool                  bUp;                //!< up button pressed.
52    bool                  bDown;              //!< down button pressed.
53    bool                  bLeft;              //!< left button pressed.
54    bool                  bRight;             //!< right button pressed.
55    bool                  bAscend;            //!< ascend button pressed.
56    bool                  bDescend;           //!< descend button presses.
57    bool                  bFire;              //!< fire button pressed.
58    bool                  bRollL;             //!< rolling button pressed (left)
59    bool                  bRollR;             //!< rolling button pressed (right)
60    bool                  bStrafeL;           //!< strafe to the left side
61    bool                  bStrafeR;           //!< strafe to the rith side
62    bool                  bJump;              //!< jump
63
64    float                 xMouse;             //!< mouse moved in x-Direction
65    float                 yMouse;             //!< mouse moved in y-Direction
66    float                 mouseSensitivity;   //!< the mouse sensitivity
67    float                 cycle;              //!< hovercycle
68
69    Vector                velocity;           //!< the velocity of the player.
70    Quaternion            mouseDirX;           //!< the direction where the player wants to fly
71    Quaternion            mouseDirY;           //!< the direction where the player wants to fly
72    Quaternion rotQuat;
73    float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
74    float                 acceleration;       //!< the acceleration of the player.
75
76    float                 airViscosity;
77
78};
79
80#endif /* _MD2_CREATURE_H */
Note: See TracBrowser for help on using the repository browser.