-
Notifications
You must be signed in to change notification settings - Fork 0
/
luciole.hpp
73 lines (53 loc) · 1.08 KB
/
luciole.hpp
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
70
71
72
73
#ifndef LUCIOLE_H
#define LUCIOLE_H
#ifdef __APPLE__
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
#include "vect3D.hpp"
#include "world.hpp"
#include "modele.hpp"
#define LUCIOLE_HEIGHT 0.10f
#define LUCIOLE_WIDTH 0.10f
#define LUCIOLE_LENGHT 0.30f
#define SQRT3 0.57735f
class Luciole
{
static int _NbLucioles;
World * _world;
int _id;
protected:
Vect3D _pos;
GLdouble _theta;
GLdouble _phi;
private:
GLdouble _thetaCible;
GLdouble _thetaOrig;
char _thetaFrame;
GLdouble _phiCible;
GLdouble _phiOrig;
char _phiFrame;
bool _enabled;
//wing angle
GLdouble _alpha;
char _frame;
static GLfloat _body[];
static GLubyte _bodyIndices[];
static GLfloat _wing[];
static GLubyte _wingIndices[];
// static GLfloat _light[];
// static GLubyte _lightIndices[];
static Modele * _light;
public:
Luciole(World * w, const Vect3D &pos, GLfloat theta = 0.0f, GLfloat phi = 0.0f);
Luciole(World *);
~Luciole();
virtual void draw();
void AI();
Vect3D getPos();
void light(bool b){_enabled = b;}
private:
void spawn();
};
#endif