/****************************************************************************************************

		MouseActions.h
		Copyright: (c) 2001 Eovia Corp. All rights reserved.

		Author:	Arnaud
		Date:	12/1/2004

****************************************************************************************************/

#ifndef __MouseActions__
#define __MouseActions__

#if CP_PRAGMA_ONCE
#pragma once
#endif


#include "BasicMCFCOMImplementations.h"
#include "MCCountedPtr.h"
#include "vector3fwd.h"

struct FacetMesh;
class TPanePart;
class TModeler;
//class TVector3;


//should make a common base class for all the modeler actions...

class TMoveMouseAction : public TBasicMouseAction
{
protected:
	TMoveMouseAction	(TModeler* inModeler, TPanePart* inPane);
	~TMoveMouseAction	();
public:
	static void Create	(IShMouseAction** outAction, TModeler* inModeler, TPanePart* inPane);
	STANDARD_RELEASE;

	//TBasicMouseAction
	virtual MCCOMErr	MCCOMAPI Do		();
	virtual MCCOMErr	MCCOMAPI Undo	();
	virtual MCCOMErr	MCCOMAPI Redo	();
	virtual boolean		MCCOMAPI CanUndo()						{ return true; }
	virtual MCCOMErr	MCCOMAPI GetName(	TMCString& name);
	virtual void		MCCOMAPI Track	(	IMCGraphicContext* gd, int16 stage, TMCPoint& first, 
											TMCPoint &prev, TMCPoint &cur,boolean moved, IShMouseAction**	nextAction);

	void		PixelToActivePlane		(const TMCPoint& inPixelPos, TVector3& outPoint);

protected:
	TMCCountedPtr<FacetMesh>		fOriginalMesh;
	TMCCountedPtr<FacetMesh>		fModifiedMesh;
	TMCCountedPtr<TModeler>			fModeler;
	TMCCountedPtr<TPanePart>		fPanePart;
};






#endif
