68 lines
3.1 KiB
C++
68 lines
3.1 KiB
C++
/*ROMTEAM WorldEditor*/
|
|
/*//////////////////////////////////////////////////////////////////////////////////////*/
|
|
/* File : Sphere3D.hpp: interface for the Sphere3D class.*/
|
|
/* Author : Cristi Petrescu*/
|
|
/* Date : 97.11*/
|
|
/* Description :*/
|
|
/*//////////////////////////////////////////////////////////////////////////////////////*/
|
|
|
|
#ifndef __SPHERE3D_HPP__
|
|
#define __SPHERE3D_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 Sphere3D : public Shape3D
|
|
{
|
|
/* data*/
|
|
private:
|
|
/* for mouse resizing*/
|
|
MTH3D_tdstVector m_stCenterInMousePlane;
|
|
|
|
/* functions*/
|
|
private:
|
|
|
|
void CommonSphere3D();
|
|
|
|
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 GetCenter (); /* return the 3D coordinates of the center of the sphere*/
|
|
void SetCenter (MTH3D_tdstVector *); /* set the 3D coordinates of the center of the sphere*/
|
|
void SetCenterX (GLI_tdxValue);
|
|
void SetCenterY (GLI_tdxValue);
|
|
void SetCenterZ (GLI_tdxValue);
|
|
|
|
GLI_tdxValue GetRadius (); /* return the radius of the sphere*/
|
|
BOOL SetRadius (GLI_tdxValue * _Radius); /* set the radius of the sphere*/
|
|
/* Return FALSE if the given value if not correct*/
|
|
/* (that is, negative. Radius is then set to 0).*/
|
|
/* The new radius is returned in * _Radius.*/
|
|
|
|
/* constructors/destructors*/
|
|
Sphere3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
|
|
Sphere3D (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);
|
|
Sphere3D (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);
|
|
~Sphere3D();
|
|
};
|
|
|
|
#endif /* */
|