forked from devpack/mayhem
-
Notifications
You must be signed in to change notification settings - Fork 2
/
physics.h
executable file
·31 lines (25 loc) · 1006 Bytes
/
physics.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
#ifndef __PHYSICS_H__
#define __PHYSICS_H__
#include <allegro5/allegro.h>
#include "platform_data.h"
#include "vaisseau_data.h"
class physics_constants {
public:
physics_constants(float g, float xfrott, float yfrott, float coeffax,
float coeffvx, float coeffay, float coeffvy,
float coeffimpact);
public:
double iG; // cte gravi
double iXfrott; // frottement en x
double iYfrott; // frottement en y
double iCoeffax; // pour dV = coeffa A
double iCoeffvx; // pour dX = coeffv V
double iCoeffay; // pour dV = coeffa A
double iCoeffvy; // pour dX = coeffv V
double iCoeffimpact; // when shooted on
};
void calcul_pos(const physics_constants &physics, int nbvaisseau,
struct vaisseau_data *vaisseau,
struct platform_data platforms[], int nbplatforms, double dt);
bool test_landed(struct vaisseau_data *vaisseau, struct platform_data *plt);
#endif