/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File        : ITBox3D.hpp: interface for the ITBox3D class.*/
/* Author      : Ionut Grozea*/
/* Date        : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __ITBox3D_HPP__
#define __ITBox3D_HPP__
 
/****************************************/
#ifndef CPA_EXPORT
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
#endif
/****************************************/
 
/****************************************/
/* classes*/
/****************************************/
 
/*#include "3dinterf.hpp" */
 
 
class ITBox3D;
 
class CPA_EXPORT ITBoxUndo : public CPA_Modif
{
	float m_fX;
	float m_fY;
	float m_fZ;
	ITBox3D *m_pBox;
	BOOL m_bFirst;
public:
	ITBoxUndo(ITBox3D *box);
	BOOL Do(){ return m_bFirst ? TRUE : Undo();}
	BOOL Undo();
};
 
 
class CPA_EXPORT ITBox3D : public Shape3D
{
/* data*/
private:
 
/* functions*/
private:
 
	MTH3D_tdstVector    m_stCenterInMousePlane;	 
 
public:
/*	void SetScale(float fScale);*/
	void SetScaleX(float fScale);
	void SetScaleY(float fScale);
	void SetScaleZ(float fScale);
/*ROMTEAM WorldEditor (Cristian Stegaru 01/98)*/
	void SetScaleXYZ(float fXScale, float fYScale, float fZScale);
	virtual void mfn_vSave (CString csEPOFile, CString csEPOName, int iIdx);
	virtual void mfn_vLoad (CString csEPOFile, CString csEPOName);
/*ENDROMTEAM WorldEditor (Cristian Stegaru)*/
	ITBox3D (CPA_EditorBase *_p_oEditor, float scale = 1.f ,const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
	void CommonITBox3D();
	void CreateITBox3D();
	BOOL m_Flag;
	float m_fGlobal;
	float m_fX;
	float m_fY;
	float m_fZ;
	float m_fXold;
	float m_fYold;
	float m_fZold;
	ACP_tdxHandleOfElement  GetHElement();
	BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
	BOOL _OnMouseMove(UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * pDeplacement);
	BOOL _OnLButtonDown(UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);
	 ~ITBox3D();
	CPA_Modif *GetUndoData(){ return new ITBoxUndo(this); }
};
 
#endif /**/
