📄 gendelaunaydoc.h
字号:
// GenDelaunayDoc.h : interface of the CGenDelaunayDoc class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_GENDELAUNAYDOC_H__32BF529A_F082_4A50_A4D3_500843DCC304__INCLUDED_)
#define AFX_GENDELAUNAYDOC_H__32BF529A_F082_4A50_A4D3_500843DCC304__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////
#include <afxtempl.h>
#include "pointpos.h"
#include "math.h"
#include "triangle.h"
#include "border.h"
/////////////////////////////////////
class CGenDelaunayDoc : public CDocument
{
protected: // create from serialization only
CGenDelaunayDoc();
DECLARE_DYNCREATE(CGenDelaunayDoc)
// Attributes
public:
// Operations
public:
void AddPoint(double x,double y);
CTypedPtrArray<CObArray,CPointPos*> m_point;//存节点
CWordArray m_con;//存放凸包边界上所有节点的坐标数组下标(of m_point),逆时针
double S(int p1,int p2,int p3);
void Center(CTriangle* temp);
void BaryCenter(CTriangle* temp);
CTypedPtrList<CObList,CTriangle*> m_tri;//存三角链
CTypedPtrArray<CObArray,CBorder*> m_edge;//Record the border of the inserted polygon
int GetInitEdges(double x,double y,int p);
CArray<POSITION,POSITION&> m_index;//指向三角形链的节点的指针数组,对将要删出的三角形做标志
bool DelEdgeOrNot(int p1,int p2,int p);
int TwoEdgeSuperposition(CBorder *b1, CBorder *b2);
int TheOtherPoint(int p1,int p2,CTriangle* temp);
CPointPos* CGenDelaunayDoc::IntersectionPoint(CPointPos *point1, CPointPos *point2,CPointPos *point3, CPointPos *point4);
void EditCon(int r,int l ,int p);
void DelTriMarked();
void AddTriangle(int p);
double S(CPointPos *p1,CPointPos *p2,CPointPos *p3);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGenDelaunayDoc)
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CGenDelaunayDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CGenDelaunayDoc)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GENDELAUNAYDOC_H__32BF529A_F082_4A50_A4D3_500843DCC304__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -