-
大小: 362KB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2021-06-11
- 語言: C/C++
- 標(biāo)簽: openGL??3ds模型??3D??Exploration??
資源簡介
該程序?qū)崿F(xiàn)三維模型在MFC視圖窗口顯示,首先利用3D Exploration軟件將3ds模型生成cpp文件,再將cpp代碼移植到MFC單文檔應(yīng)用程序中。

代碼片段和文件信息
//?3DTest.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“3DTest.h“
#include?“MainFrm.h“
#include?“3DTestDoc.h“
#include?“3DTestView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMy3DTestApp
BEGIN_MESSAGE_MAP(CMy3DTestApp?CWinApp)
//{{AFX_MSG_MAP(CMy3DTestApp)
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()
/////////////////////////////////////////////////////////////////////////////
//?CMy3DTestApp?construction
CMy3DTestApp::CMy3DTestApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CMy3DTestApp?object
CMy3DTestApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CMy3DTestApp?initialization
BOOL?CMy3DTestApp::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(CMy3DTestDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CMy3DTestView));
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->UpdateWind
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????28956??2011-05-23?16:03??3DTest\3DTest.aps
?????文件???????2238??2011-05-23?20:12??3DTest\3DTest.clw
?????文件???????4237??2011-05-23?15:09??3DTest\3DTest.cpp
?????文件???????4637??2011-05-23?21:39??3DTest\3DTest.dsp
?????文件????????520??2011-05-23?15:09??3DTest\3DTest.dsw
?????文件???????1366??2011-05-23?15:09??3DTest\3DTest.h
?????文件??????66560??2011-05-24?10:54??3DTest\3DTest.ncb
?????文件??????53760??2011-05-24?10:54??3DTest\3DTest.opt
?????文件???????1561??2011-05-24?09:16??3DTest\3DTest.plg
?????文件??????10555??2011-05-23?15:09??3DTest\3DTest.rc
?????文件???????1776??2011-05-23?15:09??3DTest\3DTestDoc.cpp
?????文件???????1489??2011-05-23?15:09??3DTest\3DTestDoc.h
?????文件?????578199??2011-05-24?09:16??3DTest\3DTestView.cpp
?????文件???????3039??2011-05-23?20:51??3DTest\3DTestView.h
?????文件?????786486??2011-05-23?20:21??3DTest\Dolls_0.bmp
?????文件???????2507??2011-05-23?15:09??3DTest\MainFrm.cpp
?????文件???????1581??2011-05-23?15:09??3DTest\MainFrm.h
?????文件?????154649??2011-05-23?20:19??3DTest\model\Dolls.3DS
?????文件?????579956??2011-05-23?20:21??3DTest\model\Dolls.cpp
?????文件????????161??2011-05-24?18:04??3DTest\model\readme.txt
?????文件???????4325??2011-05-23?15:09??3DTest\ReadMe.txt
?????文件???????1078??2011-05-23?15:09??3DTest\res\3DTest.ico
?????文件????????398??2011-05-23?15:09??3DTest\res\3DTest.rc2
?????文件???????1078??2011-05-23?15:09??3DTest\res\3DTestDoc.ico
?????文件???????1078??2011-05-23?15:09??3DTest\res\Toolbar.bmp
?????文件????????494??2011-05-23?15:09??3DTest\Resource.h
?????文件????????208??2011-05-23?15:09??3DTest\StdAfx.cpp
?????文件???????1054??2011-05-23?15:09??3DTest\StdAfx.h
?????目錄??????????0??2011-05-24?17:26??3DTest\model
?????目錄??????????0??2011-05-23?15:09??3DTest\res
............此處省略4個(gè)文件信息
- 上一篇:一個(gè)步態(tài)識(shí)別 軟件
- 下一篇:三菱PLC 串口通信程序
評(píng)論
共有 條評(píng)論