#pragma once

#include "tool3D.h"
#include <vector>


namespace Tl {

	class SelectVertexLassoTool : public Tool3D
	{
	public:
		SelectVertexLassoTool(PaintCanvas* canvas);

		std::string title() const { return "[PaintCanvas]: "; }

		virtual void press(QMouseEvent *e) ;
		virtual void release(QMouseEvent *e) ;
		virtual void move(QMouseEvent *e) ;
		virtual void drag(QMouseEvent *e) {}

		virtual void reset() ;

		virtual void draw() const ;

	private:
		void draw_stroke_using_opengl() const ;

		void process_selection();

	private:
		std::vector<Point2f>	stroke_;
		bool					drawing_;
		bool					finished_;
	};

};