資源簡介
簡單多邊形的屋脊線計算算法.嚴格按照各角平分線求交計算,非常精確。凸多邊形基本沒問題,凹多邊形還需進一步改進算法。

代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“RidegLine.h“
#include?“MainFrm.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMainframe
IMPLEMENT_DYNCREATE(CMainframe?CframeWnd)
BEGIN_MESSAGE_MAP(CMainframe?CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static?UINT?indicators[]?=
{
ID_SEPARATOR???????????//?status?line?indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?construction/destruction
CMainframe::CMainframe()
{
//?TODO:?add?member?initialization?code?here
}
CMainframe::~CMainframe()
{
}
int?CMainframe::OnCreate(LPCREATESTRUCT?lpCreateStruct)
{
if?(CframeWnd::OnCreate(lpCreateStruct)?==?-1)
return?-1;
if?(!m_wndToolBar.CreateEx(this?TBstyle_FLAT?WS_CHILD?|?WS_VISIBLE?|?CBRS_TOP
|?CBRS_GRIPPER?|?CBRS_TOOLTIPS?|?CBRS_FLYBY?|?CBRS_SIZE_DYNAMIC)?||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed?to?create?toolbar\n“);
return?-1;??????//?fail?to?create
}
if?(!m_wndStatusBar.Create(this)?||
!m_wndStatusBar.SetIndicators(indicators
??sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed?to?create?status?bar\n“);
return?-1;??????//?fail?to?create
}
//?TODO:?Delete?these?three?lines?if?you?don‘t?want?the?toolbar?to
//??be?dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
return?0;
}
BOOL?CMainframe::PreCreateWindow(CREATESTRUCT&?cs)
{
if(?!CframeWnd::PreCreateWindow(cs)?)
return?FALSE;
//?TODO:?Modify?the?Window?class?or?styles?here?by?modifying
//??the?CREATESTRUCT?cs
return?TRUE;
}
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?diagnostics
#ifdef?_DEBUG
void?CMainframe::AssertValid()?const
{
CframeWnd::AssertValid();
}
void?CMainframe::Dump(CDumpContext&?dc)?const
{
CframeWnd::Dump(dc);
}
#endif?//_DEBUG
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?message?handlers
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1655??2007-11-20?21:54??中軸線?RidegLine?2.0\TLine.h
?????文件???????3922??2007-11-21?22:12??中軸線?RidegLine?2.0\MyList.cpp
?????文件???????2372??2007-11-11?11:29??中軸線?RidegLine?2.0\MainFrm.cpp
?????文件???????4160??2007-11-22?12:53??中軸線?RidegLine?2.0\TPlane.cpp
?????文件???????2600??2009-04-05?00:15??中軸線?RidegLine?2.0\RidegLine.clw
?????文件???????4383??2007-11-10?20:34??中軸線?RidegLine?2.0\ReadMe.txt
?????文件???????1389??2007-11-10?20:34??中軸線?RidegLine?2.0\RidegLine.h
?????文件???????4263??2007-11-10?20:34??中軸線?RidegLine?2.0\RidegLine.cpp
?????文件???????1054??2007-11-10?20:34??中軸線?RidegLine?2.0\StdAfx.h
?????文件????????211??2007-11-10?20:34??中軸線?RidegLine?2.0\StdAfx.cpp
?????文件???????1440??2007-11-11?11:18??中軸線?RidegLine?2.0\MainFrm.h
?????文件???????1508??2007-11-10?20:34??中軸線?RidegLine?2.0\RidegLineDoc.h
?????文件???????1802??2007-11-10?20:34??中軸線?RidegLine?2.0\RidegLineDoc.cpp
?????文件???????2076??2007-11-25?02:10??中軸線?RidegLine?2.0\TRidegLine.h
?????文件???????1143??2007-11-16?21:20??中軸線?RidegLine?2.0\TVector.h
?????文件????????526??2007-11-10?20:34??中軸線?RidegLine?2.0\RidegLine.dsw
?????文件???????4721??2006-11-25?13:21??中軸線?RidegLine?2.0\TLine.cpp
?????文件???????1182??2007-11-12?12:49??中軸線?RidegLine?2.0\TPlane.h
?????文件???????1881??2007-11-17?10:34??中軸線?RidegLine?2.0\TPoint.cpp
?????文件???????1379??2007-11-17?10:34??中軸線?RidegLine?2.0\TPoint.h
?????文件???????1973??2009-04-05?01:16??中軸線?RidegLine?2.0\RidegLine.plg
?????文件????????882??2007-11-25?12:06??中軸線?RidegLine?2.0\RidegLine.sln
????..A..H.?????28160??2008-05-19?17:06??中軸線?RidegLine?2.0\RidegLine.suo
?????文件??????11566??2007-11-25?12:06??中軸線?RidegLine?2.0\RidegLine.vcproj
?????文件???????1427??2008-05-19?17:06??中軸線?RidegLine?2.0\RidegLine.vcproj.2216E8DC1BFE49C.Administrator.user
?????文件???????1278??2007-11-19?20:09??中軸線?RidegLine?2.0\TVector.cpp
?????文件???????1227??2007-11-21?22:06??中軸線?RidegLine?2.0\MyList.h
?????文件??????99328??2009-04-05?01:18??中軸線?RidegLine?2.0\RidegLine.ncb
?????文件???????9443??2009-04-04?22:31??中軸線?RidegLine?2.0\TRidegLine.cpp
?????文件????????807??2009-04-04?23:05??中軸線?RidegLine?2.0\Resource.h
............此處省略19個文件信息
- 上一篇:FTP斷點續傳的原理
- 下一篇:OLED點陣中文字符數字變量顯示的驅動
評論
共有 條評論