created input, graphics and game namespaces
[physics.git] / src / Entities / Ball.cpp
CommitLineData
ad9f1fb6 1#include "Ball.h"
5f1f55d1
PG
2#include "../debug.h"
3
ad9f1fb6 4#include "../Vector2.h"
44b079f8 5#include "../graphics/graphics.h"
ad9f1fb6 6
617dcc71
PG
7
8/// ***** Constructors/Destructors *****
9
5f1f55d1
PG
10Ball::Ball(const Vector2& pos, float radius, const float* color)
11 : PhysicsEntity(pos), radius(radius), color(color)
ad9f1fb6
PG
12{
13
14}
15Ball::~Ball()
16{
17
18}
19
617dcc71
PG
20/// ***** Public Class Methods *****
21
ad9f1fb6
PG
22void Ball::draw() const
23{
68b2316d 24 graphics::drawCircle(radius, position, color);
ad9f1fb6 25}
094a13b8
PG
26
27float Ball::getRadius() const
28{
29 return radius;
30}