aboutsummaryrefslogtreecommitdiffstats
path: root/include/YAGE/Physics/particlebody.hpp
blob: d9d5e08c14c1513d09966a3e30c420ac977cd6ae (plain)
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
#ifndef YAGE_PARTICLE_BODY_HPP
#define YAGE_PARTICLE_BODY_HPP

#include <glm/glm.hpp>

#include "body.hpp"

namespace yage
{

class ParticleBody : public Body
{
public:
	ParticleBody(const glm::vec2 &position=glm::vec2(0.f, 0.f),
	             double mass=1.0,
	             const glm::vec2 &velocity=glm::vec2(0.f, 0.f),
	             bool gravity=true);

	// apply a force to the rigid body
	virtual void applyForce(const glm::vec2 &force);
	virtual void update();
};

} // yage

#endif