blob: bf72982817092b58a542ea27a780fb579a0e950b (
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
|
#ifndef YAGE_RIGID_BODY_HPP
#define YAGE_RIGID_BODY_HPP
#include "body.hpp"
namespace yage
{
class RigidBody : public Body
{
public:
RigidBody(const glm::vec2 ¢er_of_mass,
double mass,
const glm::vec2 &force=glm::vec2(0.f, 0.f),
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
|