www.pudn.com > CGMEC013395.rar > ChildView.h
// ChildView.h : interface of the CChildView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CHILDVIEW_H__66120FB7_612A_4D25_B0DF_5D2C373DDBF8__INCLUDED_)
#define AFX_CHILDVIEW_H__66120FB7_612A_4D25_B0DF_5D2C373DDBF8__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Circle.h"
/////////////////////////////////////////////////////////////////////////////
// CChildView window
struct Point {
double x,y;
};
typedef CArray CPointArray;
class CChildView : public CWnd
{
// Construction
public:
CChildView();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChildView)
protected:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
// Implementation
public:
void DrawConvexHull(CDC *,COLORREF);
vector SearchConvexHull(vector vecPoints);
CPoint FindCircleCenterOf3Points(CPoint a,CPoint b,CPoint c);
CCircle* FindMEC(CPointArray& arrPoints);
double GetDistance(CPoint& p1, CPoint& p2);
virtual ~CChildView();
// Generated message map functions
protected:
int m_iAlgorithm;
int m_isSelected;
int m_nstIndex;
int m_sIndex;
int m_delta;
bool m_lButtonDown;
CDC m_dcMem;
CPointArray m_arrPoints;
CPointArray m_arrNearPoints;
int m_nPoints;
bool m_nGraphs[6];
CCircle* m_MECircle;
enum {m_NN,m_LA,m_SC,m_SI,m_CH,m_MEC};
vector m_NearLine;
//{{AFX_MSG(CChildView)
afx_msg void OnPaint();
afx_msg void OnPointsAdd();
afx_msg void OnUpdatePointsAdd(CCmdUI* pCmdUI);
afx_msg void OnUpdatePointsSelect(CCmdUI* pCmdUI);
afx_msg void OnPointsSelect();
afx_msg void OnUpdateGraphsCh(CCmdUI* pCmdUI);
afx_msg void OnGraphsCh();
afx_msg void OnGraphsLa();
afx_msg void OnUpdateGraphsLa(CCmdUI* pCmdUI);
afx_msg void OnGraphsMec();
afx_msg void OnUpdateGraphsMec(CCmdUI* pCmdUI);
afx_msg void OnGraphsNn();
afx_msg void OnUpdateGraphsNn(CCmdUI* pCmdUI);
afx_msg void OnUpdateGraphsSc(CCmdUI* pCmdUI);
afx_msg void OnGraphsSc();
afx_msg void OnGraphsSi();
afx_msg void OnUpdateGraphsSi(CCmdUI* pCmdUI);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnPointsDel();
afx_msg void OnPointsDap();
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnAlgorithmOn2();
afx_msg void OnUpdateAlgorithmOn2(CCmdUI* pCmdUI);
afx_msg void OnAlgorithmOn3();
afx_msg void OnUpdateAlgorithmOn3(CCmdUI* pCmdUI);
afx_msg void OnPointsRandomadd();
afx_msg void OnUpdatePointsRandomadd(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHILDVIEW_H__66120FB7_612A_4D25_B0DF_5D2C373DDBF8__INCLUDED_)