blob: 524a92ee5e834dce3655c1206c1afd916ad20d03 (
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
27
28
29
30
31
32
33
|
/* ----------------------------------------------------------------------------
* body.cpp
*
* Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
* See file LICENSE for more details
* ----------------------------------------------------------------------------
*/
#include "Physics/body.hpp"
namespace yage
{
const double Body::GRAVITY=-9.81;
Body::~Body()
{}
double Body::xPosition() const
{
return position_[0];
}
double Body::yPosition() const
{
return position_[1];
}
Body::Body(const Vector2d &position, double mass, const Vector2d &velocity, bool gravity) :
position_(position), mass_(mass), velocity_(velocity), gravity_(gravity)
{}
} // yage
|