571 lines
24 KiB
C++
571 lines
24 KiB
C++
/*=========================================================================
|
|
*
|
|
* EDTbase.hpp
|
|
*
|
|
*
|
|
* Version 1.0
|
|
* Creation date
|
|
* Revision date
|
|
*
|
|
* Shaitan
|
|
*=======================================================================*/
|
|
#ifdef ACTIVE_EDITOR
|
|
|
|
#ifndef __EDTBASE_HPP__
|
|
#define __EDTBASE_HPP__
|
|
|
|
#include "itf/CPAHieEd.hpp"
|
|
#include "ITF.h"
|
|
|
|
class EDT_DialogEdit;
|
|
class EDT_DialogUpdate;
|
|
class EDT_DialogMove;
|
|
class EDT_DialogFlag;
|
|
class EDT_ModifMove;
|
|
class EDT_DialogSelect;
|
|
class EDT_SpecificEditor;
|
|
class EDT_TempList;
|
|
|
|
#include "EDTEnum.hpp"
|
|
#include "EDTSObj.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
|
|
//**************************************
|
|
|
|
|
|
#define NB_MAX_MODES 15
|
|
|
|
#define C_szHierarchyIniFile "Hierarchy\\EDTKeys.ini"
|
|
|
|
/*===========================================================================
|
|
* Description: Class EDT_HierarchyEditor
|
|
* Creation date:
|
|
* Author: Shaitan
|
|
*---------------------------------------------------------------------------
|
|
* Revision date: Author:
|
|
*=========================================================================*/
|
|
class EDT_HierarchyEditor : public CPA_HierarchyEditor
|
|
{
|
|
protected:
|
|
|
|
//== Links ==
|
|
BOOL m_bHasCurrentWorld;
|
|
|
|
//== Tools ==
|
|
CPA_KeyActionConfiguration * m_p_oDevKeyboard;
|
|
EDT_SpecificEditor * m_pSpecificEditor;
|
|
long m_lNbSpecificActions;
|
|
|
|
//== Frames ==
|
|
CSplitFrame * m_pLeftFrame;
|
|
CSplitFrame * m_pBottomFrame;
|
|
|
|
//== Dialogs ==
|
|
EDT_DialogEdit * m_pDialogEdit;
|
|
CPA_DialogList * m_pDialogList;
|
|
EDT_DialogUpdate * m_pDialogUpdate;
|
|
EDT_DialogMove * m_pDialogMove;
|
|
EDT_DialogFlag * m_pDialogFlag;
|
|
EDT_DialogSelect * m_pDialogSelect;
|
|
|
|
//== Moves ==
|
|
EDT_ModifMove * m_pMouseMove;
|
|
EDT_ModifMove * m_pKeyMove;
|
|
tdeMouseMoveMode m_eMouseMoveMode;
|
|
BOOL m_bAvoidKeyRepeat;
|
|
BOOL m_bMovedObjectStaysOnScreen;
|
|
|
|
//== Orientation ==
|
|
EDT_SuperObject * m_pOrientedObject;
|
|
EDT_ModifMove * m_pOrientMove;
|
|
BOOL m_bKeepOrientMode;
|
|
|
|
//== Register Selection ==
|
|
//CPA2 Corneliu Babiuc (multiple registration) 06-07-98
|
|
// EDT_SuperObject * m_pRegisteredObject;
|
|
//END CPA2 Corneliu Babiuc (multiple registration) 06-07-98
|
|
|
|
//== Modifs ==
|
|
CPA_List<EDT_SaveParents> m_stListOfModifParent;
|
|
CPA_List<CPA_BaseObject> m_stListToEdit;
|
|
CPA_List<EDT_SaveParents> m_stListToCopy;
|
|
long m_lNbCopy;
|
|
|
|
//== Modes ==
|
|
tdeEditorMode m_eEditorMode;
|
|
HCURSOR m_a_hCursors[NB_MAX_MODES];
|
|
BOOL m_bMultiSelectMode;
|
|
|
|
//== Cancels ==
|
|
tdeCancelMode m_eModifCanceled;
|
|
CString m_csMessage;
|
|
|
|
//== Hierarchy ==
|
|
CPA_List<CPA_SuperObject> m_stListHierarchy;
|
|
long m_lNbUnknown;
|
|
|
|
//== Super-Object Save ==
|
|
CString m_csSOReferencePath;
|
|
|
|
//== Temporary Modifs ==
|
|
EDT_TempList * m_pListOfTempModifs;
|
|
|
|
// Load Message
|
|
CString m_csLoadingMessage;
|
|
int m_iLoadingStatus;
|
|
|
|
// icons for dialog list
|
|
CImageList m_oMainIconList;
|
|
CImageList m_oTreeIconList;
|
|
|
|
// mouse
|
|
BOOL m_bCanDisplayPopup;
|
|
BOOL m_bDoDialogSelect;
|
|
BOOL m_bDisableFirstMove;
|
|
|
|
//CPA2 Corneliu Babiuc (multiple registration) 06-07-98
|
|
// BOOL m_bIsASelection;
|
|
//END CPA2 Corneliu Babiuc (multiple registration) 06-07-98
|
|
|
|
BOOL m_bSelectSector;
|
|
BOOL m_bSelectSectorWithMouse;
|
|
tdstMousePos m_stLBDownMousePos;
|
|
|
|
// Begin Silviu Simen 18 August 1998 Cut/Paste Mechanism
|
|
EDT_SuperObject * m_pRegisteredCuttedObject;
|
|
BOOL m_bSpecialObject;
|
|
// End Silviu Simen 18 August 1998 Cut/Paste Mechanism
|
|
|
|
public:
|
|
|
|
/*===========================================================================
|
|
Contructor
|
|
=========================================================================*/
|
|
EDT_HierarchyEditor();
|
|
~EDT_HierarchyEditor();
|
|
|
|
void Create (void);
|
|
|
|
//#################################################################################
|
|
// EDITOR BASE
|
|
//#################################################################################
|
|
|
|
/*===========================================================================
|
|
Messages
|
|
=========================================================================*/
|
|
// construction
|
|
void fn_vJustAfterRegistered (void);
|
|
void fn_vConstruct (void);
|
|
// focus
|
|
void fn_vBeforeEngine (void);
|
|
void fn_vBeforeEditor (void);
|
|
//engine
|
|
BOOL fn_bAcceptToRunEngine(void);
|
|
BOOL fn_bAcceptToRunTimerEngine(void) { return TRUE; };
|
|
// end appli
|
|
void fn_vJustBeforeClosing(void);
|
|
BOOL fn_bAcceptToExit(void);
|
|
// keys
|
|
BOOL _OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags);
|
|
BOOL _OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags);
|
|
// mouse
|
|
BOOL _OnMouseMove (UINT nFlags, tdstMousePos *p_stPos, MTH3D_tdstVector *p_stVect);
|
|
BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
|
|
BOOL _OnRButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
|
|
BOOL _OnLButtonDown (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
|
|
BOOL _OnRButtonDown (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
|
|
BOOL _OnLButtonUp (UINT nFlags, tdstMousePos *p_stPos);
|
|
BOOL _OnRButtonUp (UINT nFlags, tdstMousePos *p_stPos);
|
|
// command
|
|
BOOL _OnCommand (UINT IDCmdMsg);
|
|
BOOL _OnUpdateCommandUI (UINT IDCmdMsg, CCmdUI *pCmdUI);
|
|
// dragdrop
|
|
BOOL _OnDragDropEnd(WPARAM wParam, LPARAM lParam);
|
|
BOOL _OnDragDropMove(WPARAM wParam, LPARAM lParam);
|
|
BOOL _OnDragDropLooseFocus(WPARAM wParam, LPARAM lParam);
|
|
BOOL _OnDragDropGainFocus(WPARAM wParam, LPARAM lParam);
|
|
// add objects to draw
|
|
virtual void fn_vAddObjectsToDraw(GLD_tdstViewportAttributes *p1, GLI_tdxHandleToLight p2, DEV_ViewPort* p3);
|
|
void fn_vAddObjectsToDraw2(GLD_tdstViewportAttributes *p1, GLI_tdxHandleToLight p2);
|
|
|
|
|
|
/*===========================================================================
|
|
Reinit
|
|
=========================================================================*/
|
|
|
|
void fn_vOnChangeRoot (void);
|
|
void fn_vOnChangeWorld (void);
|
|
void fn_vOnChangeDevice (void);
|
|
|
|
/*===========================================================================
|
|
for Dialog List
|
|
=========================================================================*/
|
|
|
|
void GetListsForDialog (CPA_DialogList *pDialog);
|
|
void fn_vInitDefaultParameters (CPA_DialogList *pDialog);
|
|
|
|
BOOL fn_bOnSelChangeHierarchyTree (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pSelectedObject, CPA_BaseObject *pSelectedParent);
|
|
BOOL fn_bOnDblClkHierarchyTree (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pSelectedObject, CPA_BaseObject *pSelectedParent);
|
|
BOOL fn_bOnSelChangeListObjects (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pSelectedObject, BOOL bUnselect);
|
|
BOOL fn_bOnDblClkListObjects (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pSelectedObject);
|
|
BOOL fn_bCanDragItemInHierarchyTree (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObjectToDrag);
|
|
BOOL fn_bCanDropItemInHierarchyTree (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObjectToDrop, CPA_BaseObject *pTarget);
|
|
BOOL fn_bOnDragDropInHierarchyTree (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject, CPA_BaseObject *pTarget);
|
|
BOOL fn_bOnSelChangeComboList (CPA_DialogList *pDialog, CString csListName);
|
|
BOOL fn_bOnButtonTest (CPA_DialogList *pDialog, CString csListName, tdeListDrawMode eDraw);
|
|
|
|
BOOL fn_bOnKeyDownInDialog (CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDraw,
|
|
CPA_BaseObject *pSelectedObject, UINT nChar, UINT nRepCnt, UINT nFlags);
|
|
BOOL fn_bOnKeyUpInDialog (CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDraw,
|
|
CPA_BaseObject *pSelectedObject, UINT nChar, UINT nRepCnt, UINT nFlags);
|
|
|
|
CPA_BaseObject * GetDialogSelection (CPA_DialogList *pDialog, CString csListName, tdeListDrawMode eDrawMode);
|
|
|
|
CPA_BaseObject * GetTreeNodeNextChild (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pParent, CPA_BaseObject *pCurrentChild);
|
|
int GetIconForTreeItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
|
|
int GetStateForTreeItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
|
|
|
|
CString GetInfoForListItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
|
|
int GetIconForListItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
|
|
int GetStateForListItem (CPA_DialogList *pDialog, CString csListName, CPA_BaseObject *pObject);
|
|
|
|
void fn_vSetANewTest (CPA_DialogList *pDialog, CString csCurrentList);
|
|
BOOL fn_bTestFunction (CString csListName, CString csTestName, CPA_BaseObject *pEdObj);
|
|
|
|
int GetNumIconFromObjectType (CString csType);
|
|
|
|
BOOL fn_bAddEntriesToTreePopup (CPA_DialogList *pDialog, CString csListName, CMenu *pMenu, UINT uiCustomEntriesStart);
|
|
BOOL fn_bAddEntriesToListPopup (CPA_DialogList *pDialog, CString csListName, CMenu *pMenu, UINT uiCustomEntriesStart);
|
|
void fn_vOnCommandInTreePopup (CPA_DialogList *pDialog, CString csListName, UINT uiCustomEntry);
|
|
void fn_vOnCommandInListPopup (CPA_DialogList *pDialog, CString csListName, UINT uiCustomEntry);
|
|
|
|
/*===========================================================================
|
|
Editor
|
|
=========================================================================*/
|
|
|
|
BOOL fn_bHasGainedFocus (void);
|
|
void fn_vOnActivateEditor (CPA_List<CPA_BaseObject> *pParams, BOOL bBackActivated=FALSE);
|
|
void fn_vOnCloseEditor (void);
|
|
|
|
/*===========================================================================
|
|
Dialog Bar - Mircea Dunka 31 Aug. 1998
|
|
=========================================================================*/
|
|
void fn_vDefineDlgBarBtnIcon (tde_DlgBarCategory wCategory, tds_DlgBarBtn *_pDlgBarBtn);
|
|
|
|
/*===========================================================================
|
|
SubMenus and PopupMenu
|
|
=========================================================================*/
|
|
|
|
BOOL fn_bDefineSubMenu (EDT_SubMenu *_p_oEDTSubMenu);
|
|
void _OnSubMenuCommand (EDT_SubMenu *_p_oEDTSubMenu,UINT uiMsgID);
|
|
|
|
BOOL fn_bDefinePopupMenu (EDT_PopUpMenu *pPopup, CPA_List<CPA_SuperObject> *pSelection, BOOL bAsCurrentEditor);
|
|
void _OnPopUpMenuCommand (UINT m_IDCmdMsg);
|
|
|
|
|
|
/*===========================================================================
|
|
SPO flags management
|
|
=========================================================================*/
|
|
|
|
BOOL fn_bAcceptModifFlag (CPA_SuperObject *pEdObj, unsigned long ulFlag);
|
|
|
|
/*===========================================================================
|
|
Save
|
|
=========================================================================*/
|
|
|
|
void fn_vBeforeSaveAll (void);
|
|
void fn_vAfterSaveAll (void);
|
|
|
|
|
|
//#################################################################################
|
|
// FOR INTERFACE
|
|
//#################################################################################
|
|
|
|
/*===========================================================================
|
|
Dialog List
|
|
=========================================================================*/
|
|
|
|
void fn_vUpdateLink (CString csCurrentMode);
|
|
void fn_vUpdateModel (void);
|
|
|
|
/*===========================================================================
|
|
Update
|
|
=========================================================================*/
|
|
|
|
void fn_vUpdateEditor (tdeModeChange eMode);
|
|
void fn_vCancelAllModes (void);
|
|
|
|
/*===========================================================================
|
|
Hierarchy
|
|
=========================================================================*/
|
|
|
|
BOOL fn_bInsertObjectInHierarchy (CPA_SuperObject *pEdObj, CPA_SuperObject *pParent, BOOL bUseEditManager = TRUE, BOOL bUpdateModif = TRUE, BOOL bSelect = TRUE, BOOL pBlock = FALSE);
|
|
BOOL fn_bInsertAsPreviousBrother (CPA_SuperObject *pEdObj, CPA_SuperObject *pBrother, BOOL bUseEditManager = TRUE, BOOL bUpdateModif = TRUE, BOOL bSelect = TRUE, BOOL pBlock = FALSE);
|
|
BOOL fn_bDeleteObjectInHierarchy (CPA_SuperObject *pEdObj, BOOL bUseEditManager = TRUE, BOOL bUpdateModif = TRUE, BOOL bDestroySuperObject = FALSE, BOOL bSelect = TRUE, BOOL pBlock = FALSE);
|
|
|
|
BOOL fn_bCanBeParent (CPA_SuperObject *pParent, tdstPosition *p_stPosition, tdeTypeSO eTypeSO, tdeSaveStatus eStatus);
|
|
BOOL fn_bCanBeParentForAll (CPA_SuperObject *pEdObj);
|
|
BOOL fn_bCanPasteAllObjects (tdePasteMode eMode, CPA_SuperObject *pNewParent = NULL, MTH3D_tdstVector *pNewPosition = NULL);
|
|
|
|
CPA_SuperObject * GetEditorObject (HIE_tdxHandleToSuperObject hSupObj);
|
|
|
|
CPA_SuperObject * GetNewSuperObject (HIE_tdxHandleToSuperObject hEngineSO,
|
|
tdeSaveStatus eStatus, tdeTypeSO eTypeSO = C_NoType,
|
|
CString csName = "", CString csEngineFileName = "");
|
|
|
|
CPA_SuperObject * GetNewSuperObject (tdeSaveStatus eStatus, tdeTypeSO eTypeSO = C_NoType,
|
|
CString csName = "", CString csEngineFileName = "");
|
|
|
|
CPA_SuperObject * GetCopyOfSuperObject (CPA_SuperObject *pModel);
|
|
|
|
/*===========================================================================
|
|
Selection Mode
|
|
=========================================================================*/
|
|
|
|
BOOL fn_bIsPyramidModeEnabled (void) { return m_eEditorMode == E_em_PyramidMode; }
|
|
BOOL fn_bIsMoveToModeEnabled (void) { return m_eEditorMode == E_em_MoveToMode; }
|
|
BOOL fn_bIsMultiSelectModeEnabled (void) { return m_bMultiSelectMode; }
|
|
|
|
|
|
//#################################################################################
|
|
// FOR SUPER-OBJECTS
|
|
//#################################################################################
|
|
|
|
EDT_SuperObject * GetOrLoadSuperObject (CString csSectionName);
|
|
CString GetEngineSectionName (HIE_tdxHandleToSuperObject hEngineSO);
|
|
CString GetSOReferencePath (void) { return m_csSOReferencePath; }
|
|
|
|
EDT_TempList * GetListOfTempModifs (void) { return m_pListOfTempModifs; }
|
|
void SetListOfTempModifs (EDT_TempList *pTempList) { m_pListOfTempModifs = pTempList; }
|
|
|
|
void fn_vAddTemporaryModif (EDT_SuperObject *pSupObj);
|
|
void fn_vRemoveTemporaryModif (EDT_SuperObject *pSupObj);
|
|
void fn_vChangeTemporaryModif (EDT_SuperObject *pSupObj);
|
|
|
|
CString GetTempListSectionName (void);
|
|
|
|
void fn_vDoDialogFlags (EDT_SuperObject *pSuperObject);
|
|
|
|
//#################################################################################
|
|
// FOR DIALOGS & MODIFS & SPECIFIC EDITOR
|
|
//#################################################################################
|
|
|
|
// members
|
|
EDT_DialogEdit * GetDialogEdit (void) { return m_pDialogEdit; }
|
|
EDT_DialogSelect * GetDialogSelect (void) { return m_pDialogSelect; }
|
|
CPA_DialogList * GetDialogList (void) { return m_pDialogList; }
|
|
CPA_List<EDT_SaveParents> * GetListOfModifParent (void) { return &m_stListOfModifParent; }
|
|
EDT_SpecificEditor * GetSpecificEditor (void) { return m_pSpecificEditor; }
|
|
BOOL fn_bHasCurrentWorld (void) { return m_bHasCurrentWorld; }
|
|
|
|
// functions
|
|
void fn_vBuildEditorHierarchy (CPA_SuperObject *pEdObj, HIE_tdxHandleToSuperObject hSupObj);
|
|
// Begin Silviu Simen september 1998 List of Objects in Sectors
|
|
void fn_vBuildListOfSectors (void);
|
|
void fn_vDoBuildListOfSectors (CPA_SuperObject *pEdObj, HIE_tdxHandleToSuperObject hSupObj);
|
|
void fn_vSelectBySectorAndType (void);
|
|
void fn_vDoSelectBySectorAndType(CString csSector, unsigned long ulType);
|
|
// End Silviu Simen september 1998 List of Objects in Sectors
|
|
void fn_vDestroySuperObject (CPA_SuperObject *pEdObj, BOOL bDestroyEngine = TRUE, BOOL bUpdateLists = TRUE);
|
|
BOOL fn_bDoOrCancelMove (EDT_ModifMove *pModifMove);
|
|
|
|
EDT_SuperObject * GetACopy (EDT_SuperObject *pEdObj, BOOL bInstanceAlone, BOOL bFirstCopy);
|
|
|
|
CString GetLoadingMessage (void) { return m_csLoadingMessage; }
|
|
int GetLoadingStatus (void) { return m_iLoadingStatus; }
|
|
//CPA2 Corneliu Babiuc (teleportation bug) 25-06-98
|
|
void fn_vAddObjectRecursiveToList(CPA_SuperObject * pSuperObject, CPA_List<EDT_ListByDLL> * p_lstListByDLL, BOOL bSelected);
|
|
//CPA2 Corneliu Babiuc (teleportation bug) 25-06-98
|
|
|
|
//#################################################################################
|
|
// PROTECTED FUNCTIONS
|
|
//#################################################################################
|
|
|
|
protected:
|
|
|
|
/*===========================================================================
|
|
Get Functions
|
|
=========================================================================*/
|
|
|
|
EDT_SuperObject * GetRecursiveCopy (EDT_SuperObject *pEdObj, EDT_SuperObject *pNewOwner, BOOL bInstanceAlone, BOOL bFirstCopy);
|
|
EDT_SuperObject * GetSuperObjectFromLinkTable (HIE_tdxHandleToSuperObject hEngineSO, EDT_SuperObject *pParent = NULL);
|
|
|
|
/*===========================================================================
|
|
Set Functions
|
|
=========================================================================*/
|
|
|
|
void SetEditorMode (tdeEditorMode eNewMode);
|
|
void SetCurrentCursor (int iNumCursor, BOOL bSaveCurrentCursor = TRUE);
|
|
|
|
/*===========================================================================
|
|
Permissions
|
|
=========================================================================*/
|
|
|
|
BOOL fn_bCanTranslateAllObjects (tdeList eList = E_lst_SelectedList/*void CPA2 Corneliu Babiuc (multiple teleportation) 03-07-98 */);
|
|
BOOL fn_bCanRotateAllObjects (void);
|
|
BOOL fn_bCanCopyAllObjects (void);
|
|
BOOL fn_bCanDeleteAllObjects (void);
|
|
BOOL fn_bCanChangeAllParents (void);
|
|
BOOL fn_bCanEnterMultiMode (void);
|
|
|
|
/*===========================================================================
|
|
Messages
|
|
=========================================================================*/
|
|
|
|
public:
|
|
void fn_vSendMessageMoving (void);
|
|
void fn_vSendMessageBeginMove (void);
|
|
protected:
|
|
void fn_vSendMessageChangeLevel (void);
|
|
void fn_vSendMessageLevelChanged (void);
|
|
|
|
/*===========================================================================
|
|
Rebuild Hierarchy
|
|
=========================================================================*/
|
|
|
|
BOOL fn_bLoadEditorMap (void);
|
|
void fn_vReinitEditorMap (BOOL bReinitLoad = TRUE);
|
|
void fn_vUpdateHierarchyList (CPA_SuperObject *pEdObj);
|
|
void fn_vDoDialogUpdate (void);
|
|
|
|
/*===========================================================================
|
|
Insertion
|
|
=========================================================================*/
|
|
|
|
EDT_SuperObject * GetParentForInsertion (CPA_ObjectDLLBase *p_oDLL, CString csTypeName, CString csModelName,
|
|
tdstPosition *p_stPosition, tdeTypeSO eTypeInsert, tdeSaveStatus eStatus);
|
|
|
|
BOOL fn_bCanInsert (EDT_SuperObject *pEdObj, EDT_SuperObject *pParent);
|
|
BOOL fn_bCanDelete (EDT_SuperObject *pEdObj);
|
|
|
|
BOOL fn_bFindPickingPosition (tdstPosition *p_stPosition);
|
|
void fn_vGetNormalFromPicking (HIE_aDEF_stTabOfPickInfo a_stPickInfo, MTH3D_tdstVector *pNormal);
|
|
void fn_vGetMinMaxPointsOfInstance (EDT_SuperObject *pEdObj, POS_tdxHandleToPosition hMatrix, MTH3D_tdstVector *p_stMinPoint, MTH3D_tdstVector *p_stMaxPoint,
|
|
/*CPA2 Corneliu Babiuc (TMS_0598) 13-06-98*/ BOOL bGlobal = FALSE);
|
|
void fn_vGetPositionFromBoundingVolume (EDT_SuperObject *pSupObj, MTH3D_tdstVector *pNormal, MTH3D_tdstVector *pVector);
|
|
|
|
/*===========================================================================
|
|
Moves
|
|
=========================================================================*/
|
|
|
|
CPA_SuperObject * fn_pstIsMouseOnObject (ACP_tdxIndex Index, HIE_tdstPickInfo *p_stObject);
|
|
void fn_vTranslateObjects (int iAxe, int iDirection);
|
|
void fn_vRotateObjects (int iAxe
|
|
/*CPA2 Corneliu Babiuc 18-05-98 */ , int iDirection = 0);
|
|
private:
|
|
//Rotation and translation step and their access members
|
|
GLI_tdxValue m_xRotationStep;
|
|
GLI_tdxValue m_xTranslationStep;
|
|
public:
|
|
GLI_tdxValue fn_xGetRotationStep(void) {return m_xRotationStep;};
|
|
void fn_vSetRotationStep(GLI_tdxValue xNewValue) {m_xRotationStep = xNewValue;};
|
|
GLI_tdxValue fn_xGetTranslationStep(void) {return m_xTranslationStep;};
|
|
void fn_vSetTranslationStep(GLI_tdxValue xNewValue) {m_xTranslationStep = xNewValue;};
|
|
protected:
|
|
//END CPA2 Corneliu Babiuc 20-05-98
|
|
void fn_vMoveToNewPosition (tdstPosition *p_stPosition);
|
|
void fn_vMoveToNewPosition (MTH3D_tdstVector* p_stPosition);
|
|
void fn_vPutOnGround (void);
|
|
//CPA2 Corneliu Babiuc (TMS_0598) 26-05-98
|
|
void fn_vMoveObjectFromMultipleSelection (
|
|
EDT_SuperObject * pSuperObject,
|
|
CPA_List<EDT_SuperObject> * p_oList,
|
|
long lIndex,
|
|
MTH3D_tdstVector * pSelectedPoint,
|
|
MTH3D_tdstVector * pNormal);
|
|
//END CPA2 Corneliu (TMS_0598) 10-06-98
|
|
//CPA2 Corneliu Babiuc (specific teleportation) 15-06-98
|
|
//function to teleport selected instance to a reference instance
|
|
void fn_vMoveToInstancePosition(EDT_SuperObject * pReferenceInstance);
|
|
//function to teleport selected instance to editor's camera position
|
|
void fn_vMoveToCameraPosition();
|
|
//function to translate all selected objects
|
|
void fn_vTranslateObjects(MTH3D_tdstVector * pTranslation);
|
|
// camera teleportation functions
|
|
void fn_vMoveCameraOrientedToInstance(EDT_SuperObject * p_oReference);
|
|
void fn_vMoveCameraToInstanceCenterOnInstance(EDT_SuperObject * p_oReference, CPA_SuperObject * p_oCenterObject);
|
|
//END CPA2 Corneliu Babiuc (specific teleportation) 18-06-98
|
|
BOOL fn_bMouseRotatesObjects (void) { return (m_eMouseMoveMode == E_mmm_MouseRotateXY || m_eMouseMoveMode == E_mmm_MouseRotateXZ); };
|
|
BOOL fn_bMouseChangesObjects (void) { return (m_eMouseMoveMode != E_mmm_NoMouseMove); };
|
|
|
|
/*===========================================================================
|
|
Copy / Paste
|
|
=========================================================================*/
|
|
|
|
void fn_vInitModifCopy (BOOL bInstanceAlone);
|
|
void fn_vInitModifPaste (tdePasteMode eMode, EDT_SuperObject *pNewParent = NULL, MTH3D_tdstVector *pNewPosition = NULL);
|
|
|
|
void fn_vInitListToCopy (CPA_List<CPA_SuperObject> *pListObjects, BOOL bInstanceAlone);
|
|
BOOL fn_bInitParentAndPos (tdePasteMode eMode, EDT_SuperObject *pNewParent = NULL, MTH3D_tdstVector *pNewPosition = NULL);
|
|
|
|
void UnSaveAllElement (EDT_SuperObject *pSupObj);
|
|
|
|
/*===========================================================================
|
|
Modifs
|
|
=========================================================================*/
|
|
|
|
static SCR_tde_Anl_ReturnValue CallBackLoadListModif (SCR_tdst_File_Description *p_fFile, char *szName, char *szParams[], SCR_tde_Anl_Action eAction);
|
|
|
|
/*===========================================================================
|
|
Others
|
|
=========================================================================*/
|
|
|
|
void fn_vSaveDialogsPreferences (void);
|
|
void fn_vDisplayCancelMessage (tdeCancelMode eModif);
|
|
void fn_vRestoreDialogs (void);
|
|
|
|
BOOL fn_bIsHierarchyTree (CString csCurrentType);
|
|
void fn_vUpdateDialogList (CString csMode);
|
|
|
|
void fn_vApplyGravityToInstance (EDT_SuperObject *pSupObj, MTH3D_tdstVector *p_stMove, MTH3D_tdstVector *p_stVertical);
|
|
|
|
BOOL fn_bCanChangeSelectedObjects (void);
|
|
|
|
/*===========================================================================
|
|
Moves
|
|
=========================================================================*/
|
|
|
|
void fn_vRotateX (POS_tdstCompletePosition *p_stMatrix, GLI_tdxValue xXAngle);
|
|
void fn_vRotateY (POS_tdstCompletePosition *p_stMatrix, GLI_tdxValue xYAngle);
|
|
void fn_vRotateZ (POS_tdstCompletePosition *p_stMatrix, GLI_tdxValue xZAngle);
|
|
|
|
/*===========================================================================
|
|
Orientation
|
|
=========================================================================*/
|
|
|
|
BOOL fn_bCanOrientSelection (void);
|
|
|
|
void fn_vOrientToPosition (EDT_SuperObject *pEdObj, MTH3D_tdstVector *pOrientPosition);
|
|
void fn_vOrientWithVertical (EDT_SuperObject *pEdObj, MTH3D_tdstVector *pOrientPosition);
|
|
void fn_vOrientWithSelectedAxis (EDT_SuperObject *pEdObj, MTH3D_tdstVector *pOrientPosition, MTH3D_tdstVector *pAxis);
|
|
|
|
// Begin Silviu Simen 18 August 1998 Cut/Paste Mechanism
|
|
public:
|
|
BOOL fn_bObjectIsSpecial();
|
|
|
|
void SetRegisteredCuttedObject (EDT_SuperObject * pSupObj) { m_pRegisteredCuttedObject = pSupObj;}
|
|
void SetSpecialObject (BOOL bSpecial) { m_bSpecialObject = bSpecial;}
|
|
// End Silviu Simen 18 August 1998 Cut/Paste Mechanism
|
|
};
|
|
|
|
|
|
|
|
// macros
|
|
#define M_GetListOfModifParent() GetParentEditor()->GetListOfModifParent()
|
|
#define M_HasCurrentWorld() GetParentEditor()->fn_bHasCurrentWorld()
|
|
|
|
extern tdstDLLIdentity g_stHierarchyIdentity;
|
|
|
|
#endif // __EDTBASE_HPP__
|
|
#endif // ACTIVE_EDITOR
|