-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.h
69 lines (61 loc) · 1.32 KB
/
player.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef PLAYER_H
#define PLAYER_H
#include "engineobject.h"
#include "camera.h"
#include "gameengine.h"
#include "sky.h"
#include "model.h"
#include <cmath>
class Player : public EngineObject
{
Q_OBJECT
public:
Player(Camera* camera, Sky* sky);
virtual void render();
void reset();
GLfloat getShiftX();
GLfloat getShiftY();
GLfloat getShiftZ();
private:
bool isInsideSky(GLdouble px,GLdouble py,GLdouble pz);
Camera* camera;
Sky* sky;
Model* model;
GLuint modelList;
int modelDepth;
bool seeLeft;
bool seeRight;
bool seeUp;
bool seeDown;
bool moveUp;
bool incrementShift;
bool decrementShift;
bool moveWhingRight;
bool moveWhingUp;
GLfloat shift;
GLint rotateAngleXY;
GLint rotateXY ;
GLfloat rotateAngleXZ;
GLfloat rotateXZ ;
GLfloat rotateModelXZ ;
GLint whingAngle;
GLint whingAngleStep;
GLint whingMaxAngle;
GLfloat tailAngle;
GLfloat tailAngleStep;
GLfloat tailMaxAngle;
const GLfloat MAX_SPEED;
const GLfloat STANDARD_SPEED;
const GLfloat MIN_SPEED;
GLfloat speed;
QTimer *timer;
bool stopMove;
signals:
void turboOn();
void turboOff();
public slots:
void moveOn(QString direction);
void moveOff(QString direction);
void update();
};
#endif // PLAYER_H