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