blob: fb6c40e7abd06317ed8016b747ac7041d4e3c915 (
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
|
#include "Physics/body.hpp"
namespace yage
{
Body::~Body()
{}
Body::Body(const glm::vec2 ¢er_of_mass, double mass, const glm::vec2 &force, const glm::vec2 &velocity, bool gravity) :
force_(force), velocity_(velocity), center_of_mass_(center_of_mass),
mass_(mass), gravity_(gravity)
{}
float Body::xPosition() const
{
return center_of_mass_.x;
}
float Body::yPosition() const
{
return center_of_mass_.y;
}
} // yage
|