//**************************************
// This is the base class of your DLL interface
// All methods of CPA_ObjectDLLBase are
// present in that class.
//**************************************

#ifndef __3DGINTERF_HPP__
#define __3DGINTERF_HPP__

//#include "ObjDLLb.hpp"

#undef CPA_WANTS_IMPORT
#undef CPA_EXPORT
#define CPA_WANTS_EXPORT
    #include "OGD\3DObject.hpp"
#undef CPA_WANTS_EXPORT
#define CPA_WANTS_IMPORT

class CDlgCaract;

class CPA_MainWorld;
class CPA_KeyActionConfiguration;
class CPA_DialogList;
class CPA_SuperObject;
class EDT_Model;
class FRMBase;
class CSplitFrame;
class GeometricFile;
//ROMTEAM WorldEditor (Viorel Preoteasa 20/01/98) 
class CDlgEditPoints;
//ENDROMTEAM WorldEditor (Viorel Preoteasa) 


//**************************************
// define
//**************************************

#define C_szGenDoorsDataPath    "Edt_Data\\Objects\\Actors\\Models\\GenDoors"

#define C_szGeometricType       "Geometric"

#define C_szFormModif           "Form"
#define C_szMaterialModif       "Material"
// BEGIN CPA2 Cristi Petrescu 98-02-
#define C_szFMDModif			"FMD"
// END CPA2 Cristi Petrescu 98-02-
#define C_szModifActionName     "Modif-Geometric"
#define C_szModifListActionName "Edit-Geometric-Modifications"

#define C_szOGDModuleNameEro	"OGD Module"

typedef CList<CString,CString>  CListOfString;

// if you want only one instance of your DLL
// activate the next line
#define DLL_ONLY_ONE_INSTANCE

//----------------------------------------------------------
// Object DLL interface class
//----------------------------------------------------------

//ROMTEAM WorldEditor (Nicu 16/01/98) 
class CTriEdit;
class CEdThread;
//ENDROMTEAM WorldEditor (Nicu) 

// BEGIN CPA2 Cristi Petrescu 98-02-
typedef struct tdstModifFile_
{
    CPA_SectionObject    *p_oModifSection;
	CPA_List<Geometry3D> oListOfModifiedObjects;
}
tdstModifFile;
// END CPA2 Cristi Petrescu 98-02-

//CPA2 Corneliu Babiuc 02-09-98 (duplicated points)
class CPA_PointsList
{
private:
    CPA_SuperObject     * m_pSelectedSuperObject; //superobject owner of points
    Geometry3D          * m_pSelectedObject;      //object owner of points
public:   
	int                   m_iNbSelectedPoints;    //number of selected points
    ACP_tdxIndex        * m_xSelectedPointsIndex; //array of points indices
    float               * m_fDist;

    //constructor
    CPA_PointsList(CPA_SuperObject * p_SO, Geometry3D * p_Object) 
    {   m_iNbSelectedPoints     = 0;
        m_pSelectedSuperObject  = p_SO;
        m_pSelectedObject       = p_Object;
        m_xSelectedPointsIndex  = new ACP_tdxIndex[p_Object->GetStruct()->xNbPoints];
        m_fDist                 = new float[p_Object->GetStruct()->xNbPoints];
    }
    //copy constructor
    CPA_PointsList(const CPA_PointsList& Points) 
    {   m_pSelectedSuperObject  = Points.m_pSelectedSuperObject;
        m_pSelectedObject       = Points.m_pSelectedObject;
        m_iNbSelectedPoints     = Points.m_iNbSelectedPoints;
        m_xSelectedPointsIndex  = new ACP_tdxIndex[m_iNbSelectedPoints];
        memcpy(m_xSelectedPointsIndex, Points.m_xSelectedPointsIndex, m_iNbSelectedPoints * sizeof(ACP_tdxIndex));
        m_fDist                 = new float[m_iNbSelectedPoints];
        memcpy(m_fDist, Points.m_fDist, m_iNbSelectedPoints * sizeof(float));
    }
    //destructor
    ~CPA_PointsList() { delete []m_xSelectedPointsIndex; delete []m_fDist;}

    //access functions
    CPA_SuperObject * GetSuperObject    (void)  {return m_pSelectedSuperObject;}
    Geometry3D      * GetObject         (void)  {return m_pSelectedObject;}
    int  GetNumberOfSelectedPoints      (void) {return m_iNbSelectedPoints;}
    void SetDistance        (int iIndex, float fDist) { ASSERT (iIndex < m_iNbSelectedPoints); m_fDist[iIndex] = fDist;}
    float GetDistance       (int iIndex) { ASSERT (iIndex < m_iNbSelectedPoints); return m_fDist[iIndex];}
    ACP_tdxIndex GetDeletePoint()   {return m_xSelectedPointsIndex[m_iNbSelectedPoints - 1];}
    ACP_tdxIndex GetPoint   (int iIndex)    {return m_xSelectedPointsIndex[iIndex];}
    //function to get the index of a selected point (in local list !!!)
    //returns the index if the point is in selection list, otherwise a negative value
    int GetPointIndexInSelection(ACP_tdxIndex xPointIndex)  
    {   for (int i=0; i < m_iNbSelectedPoints; i++)
            if (m_xSelectedPointsIndex[i] == xPointIndex) return i;
        return -1;
    }
    void AddPointToSelection (ACP_tdxIndex xPointIndex) {m_xSelectedPointsIndex[m_iNbSelectedPoints++] = xPointIndex;}
    //function to remove a point from selection
    //gets as perameter the index in selection list !!!
    void RemovePointFromSelection(int iIndex)
    {
        ASSERT(iIndex < m_iNbSelectedPoints);
        for ( ;iIndex<m_iNbSelectedPoints-1; iIndex++)
            m_xSelectedPointsIndex[iIndex] = m_xSelectedPointsIndex[iIndex+1];
        m_iNbSelectedPoints--;
    }
};
//END CPA2 Corneliu Babiuc 02-09-98 (duplicated points)

class Geometry3D_Interface : public CPA_ObjectDLLBase
{
private:
    CPA_SuperObject            *m_p_SelectedSprObj;
    Geometry3D                 *m_p_SelectedObject;

//--------------------------------------
//ROMTEAM WorldEditor (Viorel Preoteasa 20/01/98) 
	CDlgEditPoints             *m_p_DlgEditPoints;

//CPA2 Corneliu Babiuc 02-09-98 (duplicated points)
//    ACP_tdxIndex               *m_xSelectedPointsIndex;
//	float                      *m_fDist;
//	int                         m_iNbSelectedPoints;
    CPA_List<CPA_PointsList>    m_lstListOfSelectedPoints;
    BOOL                        m_bSelectDuplicatesMode;
    // the above boolean tells if the last move was in normal mode (TRUE) or duplicates mode (FALSE)
    BOOL                        m_bLastMoveWasNormal;
//END CPA2 Corneliu Babiuc 02-09-98 (duplicated points)
    BOOL                        m_bLButtonIsDown;
	int                         m_iDeletePoint;
    BOOL                        m_bShiftUsed;
	MTH3D_tdstVector            m_stTranslatedPoint;
	BOOL                        m_bVolSelection;
	//ACP_tdxIndex                m_xSelectedPointIndex;
//ENDROMTEAM WorldEditor (Viorel Preoteasa) 
//---------------------------------------
    BOOL                        m_bPointSelected;
    MTH3D_tdstVector            m_st3DTranslation;
    BOOL                        m_bPointTranslated;
    CDlgCaract                 *m_p_DlgCaract;
    CPA_KeyActionConfiguration *m_p_oKeyConfiguration;
    BOOL                        m_bCtrlUsed;
    CPA_DialogList             *m_p_DlgList;
    CSplitFrame                *m_p_oSplitterLeft;
    CString                     m_csPreviousSelectMode;
    CPA_BaseObjectList          m_oListOfSuperObjectPO;
	BOOL						m_bShowWarnings;
	BOOL						m_bStopWarnings;

//ROMTEAM WorldEditor (Nicu 05/12/97) 
		void *m_LastGeom;		// save GPO geom
//ENDROMTEAM WorldEditor (Nicu) 

// ANNECY MT 23/02/98 {
	BOOL						m_bShowBoundingVolume;
    CPA_SuperObject            *m_p_oBoundingVolumeSprObj;
    Geometry3D                 *m_p_oBoundingVolumeObject;
// END ANNECY MT }
	Geometry3D                 *m_p_ModifiedObject;
	ACP_tdxHandleOfElement		m_hModifiedElement;
	GMT_tdxHandleToGameMaterial m_hElementMaterial;

public:
// LinkTable for Modif Section
    //CListOfString               m_oListOfModifSection;
    //CListOfString               m_oListOfModificationFiles;
	// BEGIN CPA2 Cristi Petrescu 98-02-
	CPA_List<tdstModifFile>       m_oListOfModifiedFiles;
	// END CPA2 Cristi Petrescu 98-02-
public:
//----------------------------------------------------------
// Constructor
//----------------------------------------------------------
    Geometry3D_Interface();
//CPA2 Corneliu Babiuc 14-09-98 (duplicated points)
    ~Geometry3D_Interface(void);
//CPA2 Corneliu Babiuc 14-09-98 (duplicated points)

// ACP MEssages Functions overload
//  BOOL    fn_bPreTranslateMessage   (MSG *);
    void    fn_vJustAfterRegistered   (void);
    void    fn_vConstruct             (void);
//  void    fn_vRefreshDatas          (void);
//  void    fn_vAddObjectsToDraw      (GLD_tdstViewportAttributes *, GLI_tdstLight *);

//ROMTEAM WorldEditor (Viorel Preoteasa 20/01/98) 
    void    fn_vAddObjectsToDraw      (GLD_tdstViewportAttributes *pViewportAttributes, GLI_tdxHandleToLight p2, DEV_ViewPort* p3);
//ENDROMTEAM WorldEditor (Viorel Preoteasa) 

	//  void    fn_vAddObjectsToDraw2     (GLD_tdstViewportAttributes *, GLI_tdstLight *);
//  BOOL    fn_bAcceptToRunEngine     (void);
    void    fn_vBeforeEngine          (void);
    void    fn_vBeforeEditor          (void);
//  void    fn_vHasLostFocus          (void);
//  BOOL    fn_bHasGainedFocus        (void);
//  BOOL    fn_bAcceptToExit          (void);
//  void    fn_vJustBeforeClosing     (void);
	void    fn_vBeforeSaveAll         (void);

// Windows MEssages Functions overload
//  BOOL    _OnCommand                (UINT);
//  BOOL    _OnUpdateCommandUI        (UINT, CCmdUI *);
    BOOL    _OnKeyDown                (UINT, UINT, UINT);
    BOOL    _OnKeyUp                  (UINT, UINT, UINT);
    BOOL    _OnMouseMove              (UINT, tdstMousePos *, MTH3D_tdstVector *);
//  BOOL    _OnLButtonDblClk          (UINT, tdstMousePos *, ACP_tdxIndex, HIE_tdstPickInfo *);
//  BOOL    _OnRButtonDblClk          (UINT, tdstMousePos *, ACP_tdxIndex, HIE_tdstPickInfo *);
    BOOL    _OnLButtonDown            (UINT, tdstMousePos *, ACP_tdxIndex, HIE_tdstPickInfo *);
// ANNECY MT 23/02/98 {
    BOOL    _OnRButtonDown            (UINT, tdstMousePos *, ACP_tdxIndex, HIE_tdstPickInfo *);
// END ANNECY MT }
    BOOL    _OnLButtonUp              (UINT, tdstMousePos *);
//  BOOL    _OnRButtonUp              (UINT, tdstMousePos *);
//  BOOL    _OnDragDropEnd            (WPARAM, LPARAM);
//  BOOL    _OnDragDropMove           (WPARAM, LPARAM);
//  BOOL    _OnDragDropLooseFocus     (WPARAM, LPARAM);
//  BOOL    _OnDragDropGainFocus      (WPARAM, LPARAM);

// for changes
    void fn_vOnChangeRoot               (void);
    void fn_vOnChangeWorld              (void);
    void fn_vOnChangeDevice             (void);

// Editor Modifs
    void fn_vOnModifDelete  (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
    void fn_vOnModifParent  (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
    void fn_vOnModifCopy    (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
    void fn_vOnModifName    (CPA_SuperObject *pEdObj, CString csInitalName, CString csFinalName, tdeTypeModif eType, tdeStatus eStatus);
    void fn_vOnSelect       (CPA_SuperObject *pEdObj, tdeTypeModif eType, tdeStatus eStatus);

//  virtual void fn_vOnModifInsert  (CPA_SuperObject *pEdObj, CPA_SuperObject *pParent,
//                                   tdstPosition *p_stPosition, tdeTypeModif eType, tdeStatus eStatus) { }

// moves
//  void fn_vOnModifMove (CPA_List<EDT_SavePos> *pListObjects, CPA_List<CPA_SuperObject> *pListConcerned, tdeTypeModif eType, tdeStatus eStatus)  { }
//  void fn_vOnBeginMove (CPA_List<CPA_SuperObject> *pListObjects, CPA_List<CPA_SuperObject> *pListConcerned, tdeStatus eStatus) { }
//  void fn_vOnMoving    (CPA_List<CPA_SuperObject> *pListObjects, CPA_List<CPA_SuperObject> *pListConcerned, tdeStatus eStatus) { }

// permission
//  virtual BOOL fn_bAcceptModifDelete      (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus)  { return TRUE; }
//  virtual BOOL fn_bAcceptModifParent      (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus)  { return TRUE; }
//  virtual BOOL fn_bAcceptModifCopy        (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus)  { return TRUE; }
//  virtual BOOL fn_bAcceptModifTranslate   (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus)  { return TRUE; }
//  virtual BOOL fn_bAcceptModifRotate      (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus)  { return TRUE; }
//  virtual BOOL fn_bAcceptModifInsert      (CPA_SuperObject *pEdObj, CPA_SuperObject *pParent, tdeStatus eStatus) { return TRUE; }
//  virtual BOOL fn_bAcceptModifScale       (CPA_SuperObject *pEdObj, tdeStatus eStatus) { return TRUE; }
//  virtual BOOL fn_bAcceptModifName        (CPA_SuperObject *pEdObj, tdeStatus eStatus) { return TRUE; }
    virtual BOOL fn_bAcceptMultiSelect      (void)  { return FALSE; }

// to precise selection
//  virtual tdeTypeAnswer fn_bAcceptSelect  (CPA_SuperObject *pEdObj, ACP_tdxIndex xIndex, HIE_tdstPickInfo *pPicking, tdeStatus eStatus) { return C_Accept; }

// -------------------------------------------------------------
// Dialog List
// -------------------------------------------------------------

    CPA_BaseObject * GetDialogSelection (CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDrawMode);
    void             GetListsForDialog  (CPA_DialogList *pDialog);

    BOOL fn_bOnSelChangeHierarchyTree   (CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject, CPA_BaseObject *pSelectedParent);
    BOOL fn_bOnDblClkHierarchyTree	    (CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject, CPA_BaseObject *pSelectedParent);
    BOOL fn_bOnSelChangeListObjects     (CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject, BOOL bUnselect);
    BOOL fn_bOnDblClkListObjects        (CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject);
//  BOOL fn_bCanDragItemInHierarchyTree	(CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pObjectToDrag)								{ return FALSE; }
//  BOOL fn_bCanDropItemInHierarchyTree	(CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pObjectToDrop, CPA_SuperObject *pTarget)	{ return FALSE; }
//  BOOL fn_bOnDragDropInHierarchyTree	(CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pObject, CPA_SuperObject *pTarget)			{ return FALSE; }
//  BOOL fn_bOnSelChangeComboList       (CPA_DialogList *pDialog, CString csTypeName) { return FALSE; }
//  BOOL fn_bOnButtonTest               (CPA_DialogList *pDialog, CString csTypeName, tdeDrawMode eDrawMode) { return FALSE; }
    void fn_vInitDefaultParameters      (CPA_DialogList *pDialog);

//	void fn_vSetANewTest	            (CPA_DialogList *pDialog, CString csCurrentList) { return; }
//  BOOL fn_bSetCustomTest	            (CPA_DialogList *pDialog) { return FALSE; }
//
//  BOOL fn_bTestFunction		        (CString csCurrentType, CString csTestName, CPA_ReachableObject *pEdObj) { return TRUE; }
//	BOOL fn_bCustomTestFunction         (CString csCurrentType, CString csTestName, CPA_ReachableObject *pEdObj) { return TRUE; }


/*===========================================================================
	Dialog Bar - Mircea Dunka 31 Aug. 1998
=========================================================================*/
	void fn_vDefineDlgBarBtnIcon (tde_DlgBarCategory wCategory, tds_DlgBarBtn *_pDlgBarBtn);

// -------------------------------------------------------------
// Menus
// -------------------------------------------------------------
    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 bIsAlone);
    void _OnPopUpMenuCommand(UINT m_IDCmdMsg);

// -------------------------------------------------------------
// Current Editor
// -------------------------------------------------------------

    tdePermission fn_eAcceptNewEditor (CPA_EditorBase *pNewDLL)     { return C_CloseBefore; }

    BOOL fn_bCanActivateEditor        (CPA_List<CPA_BaseObject> *pParam);
    BOOL fn_bCanCloseEditor           (void);

    void fn_vOnActivateEditor         (CPA_List<CPA_BaseObject> *pParam, BOOL bBackActivated=FALSE);
    void fn_vOnCloseEditor            (void);

//  CString GetCurrentEditorName       (void);

//  void fn_vBackActiveMe       (void *pMyData) {};
//  void fn_vEraseWalkDataStructure (void *pMyData) {};

/*===========================================================================
	General Purpose
=========================================================================*/

    long OnQueryAction  (CPA_EditorBase * /*p_oSender*/, WPARAM, LPARAM);
//  long OnQueryInfos   (CPA_EditorBase * /*p_oSender*/, WPARAM, LPARAM) { return 0; };
//  long OnQueryOpen    (CPA_EditorBase * /*p_oSender*/, WPARAM, LPARAM) { return 0; };
//  long OnQueryClose   (CPA_EditorBase * /*p_oSender*/, WPARAM, LPARAM) { return 0; };

/*===========================================================================
	Coherence
=========================================================================*/

//  BOOL fn_bOnInvalidateLink   (CPA_ObjectBase *pOwner, CPA_ObjectBase *pReferencedObject, BOOL bDestroyed) { return FALSE; }
//  void fn_vOnRestoreLink      (CPA_ObjectBase *pOwner, CPA_ObjectBase *pReferencedObject) { }

//====================================================================================
//====================================================================================
//====================================================================================
//========================= OBJECT DLL FUNCTIONS OVERLOAD ============================
//====================================================================================
//====================================================================================
//====================================================================================

// hierarchy
    CPA_SuperObject *   GetNewEditorInstance     (HIE_tdxHandleToSuperObject pEngineInstance);
//  void                fn_vUpdateEditorInstance (CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject pEngineInstance) { }
    BOOL                fn_bCanHandleThisType    (long lEngineType);

// models & instances
    void            fn_vInitListByType          (CPA_World *pWorld);
//  void            fn_vInitListsOfModels       (void);
//  void            fn_vSaveListModels      (CString csListName, CPA_List<EDT_Model> *pListModels) { }
//  CString         fn_pszLoadListModels    (void)                  { return NULL; }
//  EDT_Model       * GetNewModel           (void)                  { return NULL; }
//  BOOL            fn_bCanLoadNewModel     (CString csListName)    { return FALSE; }
//  BOOL            fn_bCanSaveListModels   (CString csListName)    { return FALSE; }
//  BOOL            fn_bCanLoadListModels   (void)                  { return FALSE; }

//  CPA_SuperObject * GetNewInstance        (CString csTypeName, CString csModelName, CPA_SuperObject *pParent) { return NULL; }
//  tdeTypeSO         GetTypeInstance       (CString csTypeName, CString csModelName) { return C_NoType; }
//  CPA_SuperObject * GetParentForInsertion (CString csTypeName, CString csModelName, tdstPosition *p_stPosition) { return NULL; }
//  BOOL            fn_bChooseInsertPosition(CPA_SuperObject *pNewInstance, CPA_SuperObject *pParent, tdstPosition *p_stPosition) { return FALSE; }

// objects
//  CPA_Object * GetNewObject (CString csObjectFile, CString csObjectName, FILE *p_fFile, CPA_MainWorld *p_oMainWorld) { return NULL; }
    CPA_BaseObject * Duplicate    (CPA_BaseObject *pObject, CPA_SuperObject *pNewSuperObject);

//  CPA_SuperObject * GetCopyOfProtectedChild (CPA_SuperObject *pInitialChild, CPA_SuperObject *pNewOwner) { return NULL; }

// permissions for EvtEditor
//  BOOL fn_bAcceptAsParent         (CPA_Object *pChild, CPA_Object *pParent)  { return TRUE; }
//  BOOL fn_bAcceptAsChild          (CPA_Object *pParent, CPA_Object *pChild)  { return TRUE; }

// when insertion is canceled
//  void fn_vOnCancelInsertion (CPA_SuperObject *pInstance);


	void fn_vBuildNewEditorInstance (CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject hEngineInstance);

//====================================================================================
//====================================================================================
// Owner
//====================================================================================
//====================================================================================
    void fn_vChangeName     (CString _csName);
    void fn_vNameChanged    (void);

    void fn_vComputeBoundingVolume              (CPA_BaseObject *pObj);
    ACP_tdxHandleOfObject fn_hGetBoundingVolume (CPA_BaseObject *_pObj);
    BOOL fn_bModificationFileExist              (CPA_BaseObject *_p_oObject);
    void fn_vComputeModificationFile            (char *_p_cFileName, CPA_SaveObject *_p_oObject);
	BOOL fn_bShowWarnings						(void);
	void fn_vStopWarnings						(void);
	void mfn_vShowOrHideElement					(BOOL _bShow, CPA_SuperObject *_p_oSprObj = NULL, Geometry3D *_p_oObject = NULL, ACP_tdxHandleOfElement hElement = 0);
protected:
    void        fn_vUnSelect                           (void);
    //void        mfn_vAddFileOnModifSectionList         (char * _szFileName);
    //BOOL        mfn_bSectionExistsOnModifSectionList   (char *_szSectionName);
    void        mfn_vUpdateModificationFilesList       (CPA_BaseObject *_p_oObject);
    void        mfn_vSavePreferences                   (void);
    void        mfn_vComputeLocalTranslation           (CPA_SuperObject *_p_oSprObj, MTH3D_tdstVector *_p_stVector,MTH3D_tdstVector *_p_stResultVector);
    void        mfn_vFillListWithPO                    (CPA_BaseObjectList *_p_oList, CPA_SuperObject *_p_oSprObj);
    char       *mfn_p_cGetOGDTypePath                  (char *_szSectionName);
//    CPA_BaseObject *mfn_p_oGetGeometricFile(char *_szSectionName);
// ANNECY MT 23/02/98 {
	void		mfn_vShowOrHideBoundingVolume		( BOOL _bShow );
// END ANNECY MT }
	// BEGIN CPA2 Cristi Petrescu 98-02-
	void		   mfn_vClearFileModificationsList();
	void		   mfn_vAddFileModification(Geometry3D *p_oObject);
	tdstModifFile *mfn_p_stGetFileModification(Geometry3D *p_oObject);
	void           mfn_vComputeModifSectionName(char *szModifSectionName, Geometry3D *p_oObject);
	static void    CallBackSaveModifListGeometricObject(SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
	static SCR_tde_Anl_ReturnValue CallBackLoadModifList(SCR_tdst_File_Description *_p_stFile, char *_pszName, char *_ap_szParams[], SCR_tde_Anl_Action _eAction);

	// END CPA2 Cristi Petrescu 98-02-

//ROMTEAM WorldEditor (Cristian Stegaru 11/97)
//CPA2 Corneliu Babiuc 02-09-98 (duplicated points)
    POSITION    mfn_pGetObjectPositionInSelectedPointsList  (CPA_SuperObject * p_SuperObject);
    POSITION    mfn_pInsertObjectInSelectedPointsList       (CPA_SuperObject * p_SuperObject, Geometry3D * p_Object);
    POSITION    mfn_pInsertPointsElementInHeadPosition      (CPA_PointsList  * p_Points);
    void        mfn_vClearListOfSelectedPoints              (void);
    BOOL        mfn_vUpdateSelectedPointsList               (CPA_SuperObject * p_SO, ACP_tdxIndex xIndex);
    void        mfn_vUpdateDuplicatedPointsList             (CPA_SuperObject * p_SO, ACP_tdxIndex xIndex, BOOL bInserted, float fDistance = 0.0);

    void        mfn_vUpdateDuplicatedPointsPositions        (void);

    //function to obtain the geometric object from SuperObject
    Geometry3D * mfn_pGetGeometricObject                    (CPA_SuperObject * p_SO);
//END CPA2 Corneliu Babiuc 16-09-98 (duplicated points)
public:
// Services
	CPA_KeyActionConfiguration *GetKeyActionConfiguration (void) {return m_p_oKeyConfiguration;};

	//interface for indexed triangle editor
public:
	BOOL mfn_bCreateITObject (CTriEdit *pITEditor, CString csName);
protected:
	CPA_EditorBase		*m_pCallingDll;
	int					m_iQueryCt;
	CEdThread			*m_pITEditor;
	BOOL mfn_bStartITEditor ();
	BOOL mfn_bEndITEditor ();
	CTriEdit *mfn_pGetITEditor ();
	CString mfn_csGetGeometricName (CString csBaseName);
//ENDROMTEAM WorldEditor (Cristian Stegaru)


};
extern tdstDLLIdentity g_stGeometry3DIdentity;

//ROMTEAM WorldEditor (Nicu 16/01/98) 
// the Keyboard configuration
#define KA_3DG_CTRL     1
#define KA_3DG_SIZE		KA_3DG_CTRL
//ENDROMTEAM WorldEditor (Nicu) 


#endif // __3DGINTERF_HPP__