-
Notifications
You must be signed in to change notification settings - Fork 0
/
physics.h
57 lines (46 loc) · 1.14 KB
/
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
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
#ifndef __PHYSICS_H__
#define __PHYSICS_H__
#include "detectable.h"
#include "point.h"
#include <string>
#include "window.h"
#include "resourcemgr.h"
#include <cmath>
#include "mathfunctions.h"
using namespace std;
class Physics
:public Detectable
{
protected:
double mass;
double xVel;
double yVel;
double friction;
double elasticity;
bool inAir;
bool goThroughPlatform;
Window* window;
ResourceMgr* resourceMgr;
public:
Physics();
Physics(Point, double, double, double);
Physics(Point, double, double);
virtual void init() = 0;
void update();
void move();
void destroy();
void transferEnergy(double, double);
void setYVel( double );
void setXVel( double );
void setInAir(bool);
void addVel(double, double);
void setFriction(double);
void radialForce(Physics*, double, double);
double getElasticity();
double getFriction();
double getXVel();
double getYVel();
bool canGoThroughPlatform();
bool getInAir();
};
#endif