#ifndef _BREAKOUTBALL_H_
#define _BREAKOUTBALL_H_

#include "Vector2.h"
#include "AABB.h"
#include "Visualisation.h"

class BreakoutBox;
class BreakoutPaddle;
class BreakoutWorldBoundaries;

class BreakoutBall
{
	public:
	BreakoutBall(const int &radius, const ColourRGB &innerColour, const ColourRGB &outerColour);
	~BreakoutBall();

	void Draw();
	void Update();
	bool HandleCollisionWithBox(BreakoutBox* pBox);
	bool HandleCollisionWithPaddle(BreakoutPaddle* pPaddle);
	bool HandleCollisionWithWorldBoundaries(BreakoutWorldBoundaries* pBounds);

	Vector2i GetPosition()					 { return m_position; }
	void	SetPosition(const Vector2i &pos)  { m_position = m_previousPosition = pos; }
	Vector2i GetVelocity()					 { return m_velocity; }
	void	SetVelocity(const Vector2i &vel)  { m_velocity = vel; }
	int		GetRadius()						 { return m_radius; }
	void	SetRadius(const int &radius)	 { m_radius = radius; }
	
	protected:
//	void GetBoxSide(const Vector2 &pointOnBox, AABB* pBox, Vector2 &ptA, Vector2 &ptB, bool &isXAxis);

	Vector2i m_position, m_previousPosition, m_velocity;
	int m_radius;
	SpriteID m_spriteID;
};

#endif
