?? curversimpleview.h
字號:
// CurverSimpleView.h : interface of the CCurverSimpleView class
//
/////////////////////////////////////////////////////////////////////////////
#include "StdAfx.h"
#include "MainFrm.h"
#include "setValue.h"
#include "SetDistancefa.h"
#if !defined(AFX_CURVERSIMPLEVIEW_H__C8747862_E81A_4E1B_86CF_F7BBE065BFAB__INCLUDED_)
#define AFX_CURVERSIMPLEVIEW_H__C8747862_E81A_4E1B_86CF_F7BBE065BFAB__INCLUDED_
#define M 20
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//原始點的輸入的結構
typedef struct
{
UINT pointID;
bool usedFlag;//使用過的點用1標記,否則用0標記
CPoint pointofxy;
}Orignpoint;
//被選擇的點集
typedef struct
{
UINT pointID;
CPoint pointofxy;
}SelectedPoint;
class CCurverSimpleView : public CView
{
protected: // create from serialization only
CCurverSimpleView();
DECLARE_DYNCREATE(CCurverSimpleView)
public:
HGLRC m_hglrc;
CDC*pDC;
CRect ClientRect;
BOOL m_bDraw;
BOOL m_MouseDown;
vector<Orignpoint> OrignVS;
vector<Orignpoint> featurepoints;
vector<Orignpoint> featurepoints2;
vector<SelectedPoint> selectedpoints;
vector<CPoint> TrianglePt;
//vector<CPoint> anglepts;
GLfloat array[M][3];
double fa;
public:
void GLDraw();
void InitPara();
void GetLineABC(CPoint pt1,CPoint pt2,float&A,float&B,float&C);
int GetSelectpointID(vector<Orignpoint> fps,int&id,float fa);
//void GetCurverPoints(vector<Orignpoint> fps,int&id,float fa);
BOOL stop();
void GetRCurver(vector<Orignpoint> fps,int idn,float fa);//id0為第一個臨時特征點
BOOL FlagEnd;
BOOL m_display;
BOOL m_b[3];
int m_MouseDownNum;
//int id1;//標識臨時特征點
BOOL m_newdraw;
BOOL m_newdrawpt;
int m_PtInTriangle;
CPoint m_ptStart,m_ptOld;
float computedis(float a,float b,float c,Orignpoint pt);
void distancejuage(float fa);
void DrawTriangle();
void Compute();
//void display(vector<SelectedPoint> pts);
//void GLDrawPoint(CPoint pt);
// Attributes
public:
CCurverSimpleDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCurverSimpleView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CCurverSimpleView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
afx_msg void OnDataimport();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnDouglasPeuker();
afx_msg void OnClear();
afx_msg void OnDrawnewline();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnJuagedistance();
afx_msg void OnJuagepointinorout();
afx_msg void OnDisplayResult();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in CurverSimpleView.cpp
inline CCurverSimpleDoc* CCurverSimpleView::GetDocument()
{ return (CCurverSimpleDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CURVERSIMPLEVIEW_H__C8747862_E81A_4E1B_86CF_F7BBE065BFAB__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -