154 lines
4.7 KiB
C++
154 lines
4.7 KiB
C++
/*
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Description : TanObj.hpp
|
|
//
|
|
// Definition of the tangent objects
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// inherit from : CPA_Object
|
|
// CPA_EdMot<ACP_tdxHandleOfLink>
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Creation date: 29 jan 1997 Author: J Thénoz
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Modification date: Author:
|
|
//
|
|
//
|
|
//
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
*/
|
|
|
|
//ANNECY Shaitan Nettoyage (12/05/98) {
|
|
/*
|
|
|
|
#ifndef __TanagentOBJECT_HPP__
|
|
#define __TanagentOBJECT_HPP__
|
|
|
|
|
|
class Waypoint_Interface;
|
|
class Link;
|
|
|
|
|
|
typedef enum _eTangentLenghtMode
|
|
{
|
|
eVariableLenghtTangent, // lenght of tangent is edited
|
|
eFixLenghtTangent // lenght of tangent is constant
|
|
}
|
|
eTangentLenghtMode;
|
|
|
|
typedef enum _eTangentOrientationMode
|
|
{
|
|
eVariableOrientationTangent, // lenght of tangent is edited
|
|
eFixOrientationTangent // lenght of tangent is constant
|
|
}
|
|
eTangentOrientationMode;
|
|
|
|
typedef enum _eTangentChangeNeighbourMode // change the neighbour tangent only
|
|
{
|
|
eNeverChangeNeighbour,
|
|
eAlwaysChangeNeighbour,
|
|
eShiftDownChangeNeighbour,
|
|
eControlDownChangeNeighbour,
|
|
eShiftUpChangeNeighbour,
|
|
eControlUpChangeNeighbour
|
|
}
|
|
eTangentNeighbourMode;
|
|
|
|
typedef enum _eTangentChangeAllMode // change all the tangents
|
|
{
|
|
eNeverChangeAll,
|
|
eAlwaysChangeAll,
|
|
eShiftDownChangeAll,
|
|
eControlDownChangeAll,
|
|
eShiftUpChangeAll,
|
|
eControlUpChangeAll
|
|
}
|
|
eTangentChangeAllMode;
|
|
|
|
class Tangent : public CPA_BaseObject
|
|
{
|
|
protected:
|
|
static Waypoint_Interface* ms_poInterface; // interface
|
|
static long ms_lNbTangent; // object counter
|
|
|
|
CPA_SuperObject* m_poSuperObject;
|
|
Link* m_poParent; // Father Link onject
|
|
MTH3D_tdstVector m_stFixVertex; // in the axis of the father object
|
|
MTH3D_tdstVector m_stTangentVector; // in the absolute axis
|
|
GLI_tdxValue m_xDim;
|
|
MTH3D_tdstVector m_stMoveVertex; // extrem vertex of the tangant
|
|
// -> is only used when tangent moves
|
|
GLI_tdxValue m_xMoveRatio; // dif between pick point and movevertex
|
|
|
|
|
|
|
|
GEO_tdstColor m_stColor; // color of the graphic tangent
|
|
eTangentLenghtMode m_eTangentLenghtMode; // lenght edition mode
|
|
eTangentOrientationMode m_eTangentOrientationMode; // orientation edition mode
|
|
eTangentNeighbourMode m_eTangentNeighbourMode; // change neighbour mode
|
|
eTangentChangeAllMode m_eTangentChangeAllMode; // change all mode
|
|
BOOL m_bOrientationAllow; // allow orientation of tangent
|
|
BOOL m_bNotifyWay; // notify the owner way
|
|
|
|
public:
|
|
// static
|
|
static void fn_vInitObject (Waypoint_Interface* poInterface);
|
|
static Waypoint_Interface* GetInterface (void);
|
|
|
|
Tangent
|
|
(
|
|
CPA_ObjectDLLBase *p_oDLL,
|
|
CPA_BaseObject *p_oOwner,
|
|
eTangentLenghtMode eLenghtMode=eVariableLenghtTangent,
|
|
eTangentOrientationMode eOrientationMode=eFixOrientationTangent,
|
|
eTangentNeighbourMode eNeighbourMode = eNeverChangeNeighbour,
|
|
eTangentChangeAllMode eChangeAllMode = eNeverChangeAll,
|
|
GEO_tdstColor* pstColor=NULL
|
|
);
|
|
|
|
void *GetEngineStruct (void) { return NULL; }
|
|
|
|
// data
|
|
long GetDataType (void);
|
|
void* GetData (void);
|
|
|
|
// set
|
|
void fn_vSetAbsoluteVertex ( MTH3D_tdstVector* pstFixAbsoluteVertex, MTH3D_tdstVector* pstTangentVe );
|
|
void fn_vSetTangent ( MTH3D_tdstVector* pstMoveAbsoluteVertex );
|
|
void fn_vSetTangentDirection ( MTH3D_tdstVector* pstAbsoluteDirectionVertex, BOOL bOppositeDirection=FALSE );
|
|
void fn_vSetColor ( GEO_tdstColor* pstColor );
|
|
void fn_vSetDim ( GLI_tdxValue xDim ) { m_xDim = xDim; }
|
|
|
|
// get
|
|
Link* fn_pGetParent (void) { return m_poParent; }
|
|
|
|
// super object
|
|
void SetSuperObject ( CPA_SuperObject* poSuperObject) { m_poSuperObject=poSuperObject; }
|
|
CPA_SuperObject* GetSuperObject (void) { return m_poSuperObject; }
|
|
|
|
// move
|
|
void fn_pGetAbsoluteTangent (MTH3D_tdstVector* pstTangent);
|
|
|
|
// draw
|
|
void fn_vConstructGraphic (void); // construct the graphic son's
|
|
void fn_vDraw (void); // refreh the draw according to the object
|
|
|
|
// moves
|
|
void fn_vStartMove ( MTH3D_tdstVector* pstStartVertex, BOOL bShift, BOOL bControl );
|
|
void fn_vMove ( MTH3D_tdstVector* pstTranslation, BOOL bShift, BOOL bControl );
|
|
void fn_vEndMove (void);
|
|
|
|
void fn_vChangeAllTangent (void); // change all the tangent of the way
|
|
|
|
protected :
|
|
void fn_vChangeNeighbourTangent (BOOL bShift, BOOL BControl);
|
|
void fn_vChangeAllTangent (BOOL bShift, BOOL BControl);
|
|
|
|
};
|
|
|
|
|
|
#endif //__TanagentOBJECT_HPP__
|
|
|
|
*/
|
|
//ENDANNECY Shaitan Nettoyage }
|