-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathparticle.h
More file actions
39 lines (35 loc) · 794 Bytes
/
Copy pathparticle.h
File metadata and controls
39 lines (35 loc) · 794 Bytes
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
/*
* Project name: Food collection
* Version 4
* Student : Albert Eduard Merino Pulido
*/
#ifndef particle_h
#define particle_h
#include <GL/glut.h>
#include "enums.h"
typedef struct Translation {
float x;
float y;
float vx;
float vy;
Translation();
Translation(float, float, float = 0, float = 0);
} Translation;
class Particle {
float vr; // -- Velocity vector
float rotation;
Translation translation;
State state;
long time_remaining;
public:
Particle();
void init_rotation(float, int);
void init_movement(Translation, int);
bool integrate(long);
bool integrate_move(long);
bool integrate_rotate(long);
Translation getTranslation();
float getRotation();
State getState();
};
#endif // ifndef particle_h