Commit | Line | Data |
---|---|---|
ad9f1fb6 PG |
1 | #ifndef PHYSICS_H |
2 | #define PHYSICS_H | |
3 | ||
4 | #include "Entity.h" | |
6aad402a | 5 | #include "../Effects/Effect.h" |
ad9f1fb6 PG |
6 | #include "../Vector2.h" |
7 | ||
8 | /// ***** Header Class ***** | |
9 | class PhysicsEntity: public Entity | |
10 | { | |
6aad402a PG |
11 | protected: |
12 | PhysicsEntity(const Vector2&); | |
ad9f1fb6 | 13 | |
6aad402a PG |
14 | public: |
15 | virtual ~PhysicsEntity(); | |
ad9f1fb6 | 16 | |
6aad402a | 17 | virtual void update(float); |
ad9f1fb6 | 18 | |
6aad402a PG |
19 | virtual Vector2 positionAt(float) const; |
20 | virtual Vector2 velocityAt(float) const; | |
ad9f1fb6 | 21 | |
6aad402a PG |
22 | virtual void applyForce(const Vector2&); |
23 | virtual void applyImpulse(const Vector2&); | |
ad9f1fb6 | 24 | |
6aad402a PG |
25 | protected: |
26 | Vector2 force; | |
ad9f1fb6 | 27 | |
6aad402a | 28 | float mass; |
ad9f1fb6 | 29 | |
6aad402a PG |
30 | // Coefficient of Restitution |
31 | float CoR; | |
32 | ||
33 | Effect* g; | |
ad9f1fb6 PG |
34 | }; |
35 | ||
36 | #endif // PHYSICS_H |