Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Алгоритм Джарвиса / SOURCE / ChildView
.h// ChildView.h : interface of the CChildView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CHILDVIEW_H__C5C9098B_35E4_11D5_A3A0_CD9C4FCAB336__INCLUDED_)
#define AFX_CHILDVIEW_H__C5C9098B_35E4_11D5_A3A0_CD9C4FCAB336__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CChildView window
#include <vector>
#include "Distribution.h"
using namespace std ;
struct CLine {
CPoint p1;
CPoint p2;
};
class CChildView : public CWnd
{
// Construction
public:
CChildView();
// Attributes
public:
CDistribution m_Distribution;
vector<CPoint> Points;
vector<CLine> Convex_hull;
int MinPoint;
int MaxPoint;
int ClientX;
int ClientY;
CMenu m_Menu;
int TimerValue;
bool Animation;
double dx,dy,x,y;
/* BITMAP bitMap;
BITMAPFILEHEADER bfhdr;
BITMAPINFOHEADER binfo;
BITMAPINFO bitin;
DWORD dwMemSize;
unsigned char *bits;*/
protected:
CBrush Bluebr;
CBrush Greenbr;
CBrush Redbr;
double Pi;
//CToolBar m_ToolBar;
// Operations
public:
void Create_Convex_hull();
void Clear();
void Generate();
void Animate();
void CALLBACK EXPORT TimerProc(HWND hWnd,UINT nMsg,UINT nIDEvent,DWORD dwTime);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChildView)
public:
virtual void Serialize(CArchive& ar);
protected:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
// Implementation
public:
double dRho;
bool bRounded;
void drawLineEx(CDC& dc,CPoint p1,CPoint p2);
CString fileName;
CString bitName;
virtual ~CChildView();
// Generated message map functions
protected:
CPoint Rounded(double rho);
double gaussian(double sigma,double mu);
double drand0(void);
double drand(void);
CPoint Even(int Mx,int My, double sigmaX,double sigmaY);
CPoint Norm(int Mx, int My, double sigmaX,double sigmaY);
//{{AFX_MSG(CChildView)
afx_msg void OnPaint();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnSize( UINT nType, int cx, int cy );
afx_msg void OnTimer( UINT );
afx_msg void OnEditClearAll();
afx_msg void OnUpdateAnimate(CCmdUI* pCmdUI);
afx_msg void OnFileOpen();
afx_msg void OnFileSave();
afx_msg void OnFileSaveAs();
afx_msg void OnFileSaveCopyAs();
afx_msg void OnRefresh();
afx_msg void OnUpdateRefresh(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__C5C9098B_35E4_11D5_A3A0_CD9C4FCAB336__INCLUDED_)
Соседние файлы в папке SOURCE