95 lines
2.7 KiB
C++
95 lines
2.7 KiB
C++
/*
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Description : CurObj.hpp
|
|
//
|
|
// Definition of the cursor object
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// inherit from : CPA_Object
|
|
// CPA_EdMot<ACP_tdxHandleOfLink>
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Creation date: 29 jan 1997 Author: J Thénoz
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Modification date: Author:
|
|
//
|
|
//
|
|
//
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
*/
|
|
|
|
|
|
#ifndef __CursorOBJECT_HPP__
|
|
#define __CursorOBJECT_HPP__
|
|
|
|
class Waypoint_Interface;
|
|
class LinkBez;
|
|
|
|
//----------- engine structure
|
|
typedef struct {} tdstCursor;
|
|
typedef tdstCursor* ACP_tdxHandleOfCursor;
|
|
//-----------
|
|
|
|
typedef enum
|
|
{
|
|
eCursorNoLimit,
|
|
eCursorCircularLimit
|
|
}
|
|
eCursorMouseMoveLimit;
|
|
|
|
class Cursor : public CPA_BaseObject
|
|
{
|
|
protected:
|
|
static long ms_lNbCursor; // cursor counter
|
|
static Waypoint_Interface* ms_poInterface; // interface
|
|
|
|
CPA_SuperObject* m_poSuperObject;
|
|
MTH3D_tdstVector m_stVertex; // local Vertex of the cursor in the m_poParent axis
|
|
GLI_tdxValue m_xDim; // dim of the cursor
|
|
CPA_SuperObject* m_poParent; // parent object = physical parent : just for axis to store vertex
|
|
BOOL m_bCursorMove; // cursor moves
|
|
eCursorMouseMoveLimit m_eMouseMoveLimit;
|
|
|
|
public:
|
|
// static
|
|
static void fn_vInitObject (Waypoint_Interface* poInterface);
|
|
static Waypoint_Interface* GetInterface (void);
|
|
|
|
Cursor ( CPA_ObjectDLLBase *p_oDLL, CPA_BaseObject *poOwner, eCursorMouseMoveLimit elimit = eCursorNoLimit );
|
|
void *GetEngineStruct (void) { return NULL; }
|
|
|
|
// data
|
|
long GetDataType (void);
|
|
void* GetData (void);
|
|
|
|
// super object
|
|
void SetSuperObject ( CPA_SuperObject* poSuperObject) { m_poSuperObject=poSuperObject; }
|
|
CPA_SuperObject* GetSuperObject (void) { return m_poSuperObject; }
|
|
|
|
//set
|
|
void fn_vSetAbsoluteVertex ( MTH3D_tdstVector* pAbsoluteVertex );
|
|
void fn_vSetLocalVertex ( MTH3D_tdstVector* pLocalVertex ) { m_stVertex = *pLocalVertex; }
|
|
|
|
//get
|
|
void fn_vGetAbsoluteVertex ( MTH3D_tdstVector* pAbsoluteVertex );
|
|
void fn_vGetLocalVertex ( MTH3D_tdstVector* pLocalVertex ) { *pLocalVertex = m_stVertex; }
|
|
|
|
// moves
|
|
void fn_vStartMove ( MTH3D_tdstVector* pstStartVertex );
|
|
void fn_vMove ( MTH3D_tdstVector* pstTranslation );
|
|
void fn_vEndMove (void);
|
|
|
|
// draw
|
|
void fn_vDraw (void);
|
|
|
|
// move
|
|
BOOL fn_bCursorMove (void);
|
|
|
|
protected :
|
|
BOOL fn_bCanMove ( MTH3D_tdstVector* pstVertex );
|
|
|
|
};
|
|
|
|
|
|
#endif //__OBJECT_HPP__
|