/*ROMTEAM WorldEditor*/ /*//////////////////////////////////////////////////////////////////////////////////////*/ /* File : Box3D.hpp: interface for the Box3D class.*/ /* Author : Cristi Petrescu*/ /* Date : 97.11*/ /* Description :*/ /*//////////////////////////////////////////////////////////////////////////////////////*/ /*////////////////////////////////////////////////////////////////////*/ #ifndef __Box3D_HPP__ #define __Box3D_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*/ /****************************************/ class CPA_EXPORT Box3D : public Shape3D { /* data*/ private: /* for mouse resizing*/ MTH3D_tdstVector m_stCenterInMousePlane; /* functions*/ private: void CommonBox3D(); public: /* mouse interface*/ /*virtual BOOL _OnLButtonUp (UINT nFlags, tdstMousePos * p_stPos);*/ virtual BOOL _OnLButtonDown (UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject); virtual BOOL _OnMouseMove (UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * pDeplacement); virtual BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo); /*virtual BOOL _OnKeyUp (UINT nChar , UINT nRepCnt , UINT nFlags);*/ /*virtual BOOL _OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);*/ /* manage esential data*/ /* All the Set functions return TRUE if the given value is correct, FALSE if not (for example, the given*/ /* MinPointX is greater than the actual MaxPointX. The MinPointX is then set to the MaxPointX)*/ /* In both case, the new value is returned*/ MTH3D_tdstVector GetMinPoint (); /* return the 3D coordinates of the point with the min coordinates*/ BOOL SetMinPoint (MTH3D_tdstVector *); BOOL SetMinPointX (GLI_tdxValue *); BOOL SetMinPointY (GLI_tdxValue *); BOOL SetMinPointZ (GLI_tdxValue *); BOOL IncMinPointX (GLI_tdxValue *); BOOL IncMinPointY (GLI_tdxValue *); BOOL IncMinPointZ (GLI_tdxValue *); MTH3D_tdstVector GetMaxPoint (); /* return the 3D coordinates of the point with the max coordinates*/ BOOL SetMaxPoint (MTH3D_tdstVector *); BOOL SetMaxPointX (GLI_tdxValue *); BOOL SetMaxPointY (GLI_tdxValue *); BOOL SetMaxPointZ (GLI_tdxValue *); BOOL IncMaxPointX (GLI_tdxValue *); BOOL IncMaxPointY (GLI_tdxValue *); BOOL IncMaxPointZ (GLI_tdxValue *); MTH3D_tdstVector GetCenter (); /* return the 3D coordinates of the center of the box*/ /* (in fact, it is the middle of the min point and the max point)*/ GLI_tdxValue GetLength (); /* return the length of the box*/ GLI_tdxValue GetWidth (); /* return the width of the box*/ GLI_tdxValue GetHeight (); /* return the height of the box*/ void SetCenter (MTH3D_tdstVector *); /* set the center of the box, dimensions are unchanged*/ void SetCenterX (GLI_tdxValue); void SetCenterY (GLI_tdxValue); void SetCenterZ (GLI_tdxValue); BOOL SetLength (GLI_tdxValue *); BOOL SetWidth (GLI_tdxValue *); BOOL SetHeight (GLI_tdxValue *); /* constructors/destructors*/ Box3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave); Box3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible); Box3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify); ~Box3D(); }; #endif /* */