change Vector2 param to a const Vector2&
[physics.git] / src / Entities / PhysicsEntity.h
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 {
10     protected:
11         PhysicsEntity(const Vector2&);
12
13     public:
14         virtual ~PhysicsEntity();
15
16         virtual void update(float);
17
18         virtual Vector2 positionAt(float) const;
19         virtual Vector2 velocityAt(float) const;
20
21         virtual void applyForce(const Vector2&);
22         virtual void applyImpulse(const Vector2&);
23
24     protected:
25         Vector2 force;
26
27         float mass;
28
29         // Coefficient of Restitution
30         float CoR;
31 };
32
33 #endif // PHYSICS_H