//	CircleDetector.h - Class used to detect when the player's drawing a circle
//					   with the mouse.
//  ----------------------------------------------------------------------------
//	This file is part of 'NiallsAVLib', base code for any kind of audiovisual
//	apps.
//	Copyright (C) 2012  Niall Moody
//	
//	This program is free software: you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation, either version 3 of the License, or
//	(at your option) any later version.
//
//	This program is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program.  If not, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#ifndef CIRCLEDETECTOR_H_
#define CIRCLEDETECTOR_H_

#include "TwoFloats.h"

///	Class used to detect when the player's drawing a circle with the mouse.
class CircleDetector
{
  public:
	///	Constructor.
	CircleDetector();
	///	Destructor.
	~CircleDetector();

	///	Updates the detector with the mouse's latest position.
	void setMousePos(const TwoFloats& mousePos);
	///	Updates the detector (to be called every frame).
	/*!
		\return True if the player has drawn a circle.
	 */
	bool update();
  private:
	///	The number of mouse positions we store.
	enum
	{
		NumPoints = 32
	};

	///	Our stored mouse positions.
	TwoFloats points[NumPoints];

	//Temp.
	float gestureWidth;
	//Temp.
	float gestureHeight;
};

#endif
