blob: 56f089ed840ebc9385b157d0c2f46425d0730e07 (
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
|
#ifndef YAGE_RIGID_BODY_HPP
#define YAGE_RIGID_BODY_HPP
#include "Physics/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);
};
} // yage
#endif
|