資源簡介
這個程序是我本科畢業設計,基于分形理論的三維植物模擬,應用了紋理貼圖、光照等,可以設置樹的形態、樣式等。需要OpenGl環境。
代碼片段和文件信息
//?FractalTree.cpp?:?定義應用程序的類行為。
//
#include?“stdafx.h“
#include?“afxwinappex.h“
#include?“afxdialogex.h“
#include?“FractalTree.h“
#include?“MainFrm.h“
#include?“FractalTreeDoc.h“
#include?“FractalTreeView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CFractalTreeApp
BEGIN_MESSAGE_MAP(CFractalTreeApp?CWinApp)
ON_COMMAND(ID_APP_ABOUT?&CFractalTreeApp::OnAppAbout)
//?基于文件的標準文檔命令
ON_COMMAND(ID_FILE_NEW?&CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?&CWinApp::OnFileOpen)
//?標準打印設置命令
ON_COMMAND(ID_FILE_PRINT_SETUP?&CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
//?CFractalTreeApp?構造
CFractalTreeApp::CFractalTreeApp()
{
//?支持重新啟動管理器
m_dwRestartManagerSupportFlags?=?AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS;
#ifdef?_MANAGED
//?如果應用程序是利用公共語言運行時支持(/clr)構建的,則:?
//?????1)?必須有此附加設置,“重新啟動管理器”支持才能正常工作。
//?????2)?在您的項目中,您必須按照生成順序向?System.Windows.Forms?添加引用。
System::Windows::Forms::Application::SetUnhandledExceptionMode(System::Windows::Forms::UnhandledExceptionMode::ThrowException);
#endif
//?TODO:?將以下應用程序?ID?字符串替換為唯一的?ID?字符串;建議的字符串格式
//為?CompanyName.ProductName.SubProduct.VersionInformation
SetAppID(_T(“FractalTree.AppID.NoVersion“));
//?TODO:?在此處添加構造代碼,
//?將所有重要的初始化放置在?InitInstance?中
}
//?唯一的一個?CFractalTreeApp?對象
CFractalTreeApp?theApp;
//?CFractalTreeApp?初始化
BOOL?CFractalTreeApp::InitInstance()
{
//?如果一個運行在?Windows?XP?上的應用程序清單指定要
//?使用?ComCtl32.dll?版本?6?或更高版本來啟用可視化方式,
//則需要?InitCommonControlsEx()。??否則,將無法創建窗口。
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?將它設置為包括所有要在應用程序中使用的
//?公共控件類。
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
//?初始化?OLE?庫
if?(!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return?FALSE;
}
AfxEnableControlContainer();
EnableTaskbarInteraction(FALSE);
//?使用?RichEdit?控件需要?AfxInitRichEdit2()
//?AfxInitRichEdit2();
//?標準初始化
//?如果未使用這些功能并希望減小
//?最終可執行文件的大小,則應移除下列
//?不需要的特定初始化例程
//?更改用于存儲設置的注冊表項
//?TODO:?應適當修改該字符串,
//?例如修改為公司或組織名
SetRegistryKey(_T(“應用程序向導生成的本地應用程序“));
LoadStdProfileSettings(4);??//?加載標準?INI?文件選項(包括?MRU)
//?注冊應用程序的文檔模板。??文檔模板
//?將用作文檔、框架窗口和視圖之間的連接
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CFractalTreeDoc)
RUNTIME_CLASS(CMainframe)???????//?主?SDI?框架窗口
RUNTIME_CLASS(CFractalTreeView));
if?(!pDocTemplate)
return?FALSE;
AddDocTemplate(pDocTemplate);
//?分析標準?shell?命令、DDE、打開文件操作的命令行
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?調度在命令行中指定的命令。??如果
//?用?/RegServer、/Register、/Unregserver?或?/Unregister?啟動應用程序,則返回?FALSE。
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?唯一的一個窗口已初始化,因此顯示它并對其進行更新
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return?TRUE;
}
int?CFractalTreeApp::ExitInstance()
{
//TODO:?處理可能已添加的附加資源
AfxOleTerm(FALSE);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????..A..H.?????75264??2018-03-23?17:03??FractalTree\.vs\FractalTree\v14\.suo
?????文件?????957440??2017-05-31?07:57??FractalTree\Debug\FractalTree.exe
?????文件????2825636??2017-05-31?07:57??FractalTree\Debug\FractalTree.ilk
?????文件????3264512??2017-05-31?07:57??FractalTree\Debug\FractalTree.pdb
?????文件?????786476??2007-03-24?16:24??FractalTree\Debug\grass.tga
?????文件??????21731??2017-04-18?17:39??FractalTree\Debug\leaf.png
?????文件??????15594??2017-05-21?10:51??FractalTree\Debug\leaf1.png
?????文件??????12311??2017-05-21?10:48??FractalTree\Debug\leaf2.png
?????文件??????12093??2017-05-21?11:00??FractalTree\Debug\leaf3.png
?????文件??????98348??2017-04-18?17:07??FractalTree\Debug\sky.tga
?????文件??????24620??2017-04-15?17:36??FractalTree\Debug\wood.tga
?????文件????????114??2018-03-03?15:28??FractalTree\FractalTree\Debug\FractalTree.log
?????文件??????49671??2017-05-31?07:57??FractalTree\FractalTree\Debug\FractalTree.obj
?????文件???59899904??2018-03-03?15:27??FractalTree\FractalTree\Debug\FractalTree.pch
?????文件?????287836??2017-05-31?07:57??FractalTree\FractalTree\Debug\FractalTree.res
?????文件??????14770??2018-03-03?15:28??FractalTree\FractalTree\Debug\FractalTree.tlog\CL.command.1.tlog
?????文件?????178732??2018-03-03?15:28??FractalTree\FractalTree\Debug\FractalTree.tlog\CL.read.1.tlog
?????文件???????8828??2018-03-03?15:28??FractalTree\FractalTree\Debug\FractalTree.tlog\CL.write.1.tlog
?????文件????????200??2018-03-03?15:28??FractalTree\FractalTree\Debug\FractalTree.tlog\FractalTree.lastbuildstate
?????文件???????3840??2017-05-31?07:57??FractalTree\FractalTree\Debug\FractalTree.tlog\li
?????文件???????9560??2017-05-31?07:57??FractalTree\FractalTree\Debug\FractalTree.tlog\li
?????文件???????2456??2017-05-31?07:57??FractalTree\FractalTree\Debug\FractalTree.tlog\li
?????文件????????470??2017-05-31?07:57??FractalTree\FractalTree\Debug\FractalTree.tlog\rc.command.1.tlog
?????文件???????4280??2017-05-31?07:57??FractalTree\FractalTree\Debug\FractalTree.tlog\rc.read.1.tlog
?????文件????????282??2017-05-31?07:57??FractalTree\FractalTree\Debug\FractalTree.tlog\rc.write.1.tlog
?????文件??????????0??2018-03-03?15:28??FractalTree\FractalTree\Debug\FractalTree.tlog\unsuccessfulbuild
?????文件??????86724??2017-05-31?07:57??FractalTree\FractalTree\Debug\FractalTreeDoc.obj
?????文件??????45822??2017-05-31?07:57??FractalTree\FractalTree\Debug\FractalTreeView.obj
?????文件????1800553??2017-05-31?07:57??FractalTree\FractalTree\Debug\GLee.obj
?????文件??????55188??2017-05-31?07:57??FractalTree\FractalTree\Debug\gltools.obj
............此處省略915個文件信息
- 上一篇:vss2005漢化包.zip
- 下一篇:QTP10.0安裝包+漢化包+破解教程
評論
共有 條評論