/********************************************************************/
/* Copyright (c) 2019 System fugen G.K. and Yuzi Mizuno          */
/* All rights reserved.                                             */
/********************************************************************/
/********************************************************************/
/**
 * @file ElpsAroundCurve.h
 * @brief MGElpsAroundCurveTool クラスのインターフェイス
 */
#pragma once

#include "Common/LocateState.h"

class MGEllipse;

/// @class MGElpsAroundCurveTool ElpsAroundCurve.h "CurveCmd/ElpsAroundCurve.h"
///
/// 楕円コマンドの曲線沿いモード。
class MGElpsAroundCurveTool : public MGLocateState{
	MGVector m_normal;
	bool m_bNear; ///< NEAR スナップの元々の状態

public:
	explicit MGElpsAroundCurveTool(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;
	MGEllipse* create_ellipse(const MGPosition& epos) const;
};
