資源簡介
本程序是基于VC++6.0環境編寫
本程序暫時只提供從點生成TIN的凸包收縮方法,且效率不高,僅供參考
本程序暫時不能生成點、線、三角形之間的拓撲關系,有興趣的可以自己做修改
本程序暫時只能保存自定義TIN格式的文本文件(可以用記事本打開),只保存了點和線的坐標,程序本身不能打開

代碼片段和文件信息
//?DTin.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“DTin.h“
#include?“MainFrm.h“
#include?“DTinDoc.h“
#include?“DTinView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CDTinApp
BEGIN_MESSAGE_MAP(CDTinApp?CWinApp)
//{{AFX_MSG_MAP(CDTinApp)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
//?Standard?file?based?document?commands
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
//?Standard?print?setup?command
ON_COMMAND(ID_FILE_PRINT_SETUP?CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CDTinApp?construction
CDTinApp::CDTinApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CDTinApp?object
CDTinApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CDTinApp?initialization
BOOL?CDTinApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
//?Change?the?registry?key?under?which?our?settings?are?stored.
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization.
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
LoadStdProfileSettings();??//?Load?standard?INI?file?options?(including?MRU)
//?Register?the?application‘s?document?templates.??Document?templates
//??serve?as?the?connection?between?documents?frame?windows?and?views.
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CDTinDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CDTinView));
AddDocTemplate(pDocTemplate);
//?Parse?command?line?for?standard?shell?commands?DDE?file?open
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?Dispatch?commands?specified?on?the?command?line
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return?TRUE;
}
/////////////////////////
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????135214??2009-11-24?21:25??DTin\Debug\DTin.exe
?????文件?????490184??2009-11-24?21:25??DTin\Debug\DTin.ilk
?????文件??????22602??2009-11-24?21:21??DTin\Debug\DTin.obj
?????文件????5494424??2009-10-20?15:40??DTin\Debug\DTin.pch
?????文件?????558080??2009-11-24?21:25??DTin\Debug\DTin.pdb
?????文件???????7600??2009-10-23?22:16??DTin\Debug\DTin.res
?????文件??????14382??2009-10-20?15:40??DTin\Debug\DTinDoc.obj
?????文件??????56600??2009-11-24?21:25??DTin\Debug\DTinView.obj
?????文件??????14823??2009-11-24?19:49??DTin\Debug\Edge.obj
?????文件??????19679??2009-11-24?21:07??DTin\Debug\MainFrm.obj
?????文件???????8616??2009-11-24?19:28??DTin\Debug\Node.obj
?????文件?????105414??2009-10-20?15:40??DTin\Debug\StdAfx.obj
?????文件???????8329??2009-11-24?19:29??DTin\Debug\Triangle.obj
?????文件?????230400??2009-11-24?21:26??DTin\Debug\vc60.idb
?????文件?????380928??2009-11-24?21:25??DTin\Debug\vc60.pdb
?????文件??????44248??2009-10-23?22:16??DTin\DTin.aps
?????文件???????2291??2009-11-24?21:15??DTin\DTin.clw
?????文件???????4173??2009-10-20?15:37??DTin\DTin.cpp
?????文件???????4878??2009-11-19?18:05??DTin\DTin.dsp
?????文件????????531??2009-10-20?15:37??DTin\DTin.dsw
?????文件???????1334??2009-10-20?15:37??DTin\DTin.h
?????文件??????74752??2009-11-24?21:27??DTin\DTin.ncb
?????文件??????56832??2009-11-24?21:27??DTin\DTin.opt
?????文件????????242??2009-11-24?21:26??DTin\DTin.plg
?????文件??????11863??2009-10-23?22:16??DTin\DTin.rc
?????文件???????1702??2009-10-20?15:37??DTin\DTinDoc.cpp
?????文件???????1453??2009-10-20?15:37??DTin\DTinDoc.h
?????文件??????14065??2009-11-24?21:25??DTin\DTinView.cpp
?????文件???????2522??2009-11-24?21:21??DTin\DTinView.h
?????文件???????1861??2009-11-24?19:49??DTin\Edge.cpp
............此處省略22個文件信息
- 上一篇:linux libstdc++.so.6庫
- 下一篇:C++編程思想C++編程思想
評論
共有 條評論