#pragma once
#include "Common/CommandStateOwner.h"

#pragma once

#include "Common/LocateState.h"


/// @class MGPolygonAroundCurveTool CircleAroundCurve.h "CurveCmd/CircleAroundCurve.h"
///
/// 多角形コマンドの曲線沿いモード。
class MGPolygonAroundCurveTool : public MGLocateState
{
	MGVector m_normal;

public:
	explicit MGPolygonAroundCurveTool(MGCommandStateOwner* owner);

	virtual bool OnKeyDown(fugenView* pView, UINT nChar, UINT nRepCnt, UINT nFlags);
	virtual bool OnLocated(const MGLocateInfo& info);
	virtual void do_make_temporary_display(mgSysGL& sgl,fugenView* pSView);

private:
	bool calculate();
	void prompt_message() const;

	int m_N;
	MGCurve* create_polygon(const MGPosition& epos) const;
};
