/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File        : Cone3D.hpp: interface for the Cone3D class.*/
/* Author      : Cristi Petrescu*/
/* Date        : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
 
#ifndef __Cone3D_HPP__
#define __Cone3D_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 Cone3D : public Shape3D  
{
/* data*/
private:
/* for mouse resizing*/
	BOOL              m_bChangeTopPointOfCone;
	/*MTH3D_tdstVector    m_stCenterInMousePlane;*/
 
/* functions*/
private:
 
	void CommonCone3D();
 
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 _OnKeyUp (UINT nChar , UINT nRepCnt , UINT nFlags);*/
	/*virtual BOOL _OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);*/
	virtual BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
/* manage esential data*/
    MTH3D_tdstVector GetBasePoint  ();                      /* Return the 3D coordinates of the base point*/
    MTH3D_tdstVector GetTopPoint   ();                      /* Return the 3D coordinates of the top point*/
    void           SetBasePoint  (MTH3D_tdstVector *);      /* Set the 3D coordinates of the base point*/
    void           SetTopPoint   (MTH3D_tdstVector *);      /* Set the 3D coordinates of the top point*/
    void           SetBasePointX (GLI_tdxValue);
    void           SetBasePointY (GLI_tdxValue);
    void           SetBasePointZ (GLI_tdxValue);
    void           SetTopPointX  (GLI_tdxValue);
    void           SetTopPointY  (GLI_tdxValue);
    void           SetTopPointZ  (GLI_tdxValue);
    MTH3D_tdstVector GetCenter     ();
    void           SetCenter     (MTH3D_tdstVector *);
    GLI_tdxValue   GetRadius     ();                      /* Get the radius of the cone*/
    BOOL           SetRadius     (GLI_tdxValue *);        /* Set the radius of the cone. Return FALSE if value is not correct*/
    GLI_tdxValue   GetAngle      ();                      /* Return the angle (in degrees) of the cone*/
    BOOL           SetAngle      (GLI_tdxValue *);        /* Set the angle (in degrees) of the cone. Return FALSE if value is not correct*/
 
/* constructors/destructors*/
	Cone3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
	Cone3D (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);
	Cone3D (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);
	~Cone3D();
};
 
#endif /* */
