YAGE  0.02
Yet Another Game Engine
particlebody.hpp
1 /* ----------------------------------------------------------------------------
2  * particlebody.hpp
3  *
4  * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
5  * See file LICENSE for more details
6  * ----------------------------------------------------------------------------
7  */
8 
9 #ifndef YAGE_PARTICLE_BODY_HPP
10 #define YAGE_PARTICLE_BODY_HPP
11 
12 #include "Math/matrix.hpp"
13 
14 #include "body.hpp"
15 
16 namespace yage {
17 
18 class ParticleBody : public Body {
19 public:
20  ParticleBody(const Vector2d& position = Vector2d(0, 0), double mass = 1,
21  const Vector2d& velocity = Vector2d(0, 0),
22  bool gravity = true);
23 
24  // apply a force to the rigid body
25  virtual void applyForce(const Vector2d& force);
26  virtual void update();
27 };
28 
29 } // yage
30 
31 #endif
Templated matrix class.
Vector2< double > Vector2d
Definition of a 2D vector.
Definition: matrix.hpp:313
Definition: camera2d.hpp:17