資源簡介
程序可以讀取obj格式的模型,在界面顯示出模型及其一下屬性

代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“OBJLoader.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)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code?!
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
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2510??2005-10-19?15:33??OBJLoader\MainFrm.cpp
?????文件???????1581??2005-10-19?15:33??OBJLoader\MainFrm.h
?????文件???????2052??2005-10-19?15:33??OBJLoader\modelcontext.h
?????文件??????17388??2005-10-19?15:33??OBJLoader\OBJFileRead.cpp
?????文件????????780??2005-10-19?15:33??OBJLoader\OBJFileRead.h
?????文件??????29160??2005-10-19?15:33??OBJLoader\OBJLoader.aps
?????文件???????2389??2005-10-19?15:33??OBJLoader\OBJLoader.clw
?????文件???????4414??2005-10-19?15:33??OBJLoader\OBJLoader.cpp
?????文件???????4819??2005-10-19?15:33??OBJLoader\OBJLoader.dsp
?????文件????????543??2005-10-19?15:33??OBJLoader\OBJLoader.dsw
?????文件???????1431??2005-10-19?15:33??OBJLoader\OBJLoader.h
?????文件?????123904??2005-10-19?15:33??OBJLoader\OBJLoader.ncb
?????文件??????50688??2005-10-19?15:33??OBJLoader\OBJLoader.opt
?????文件???????1212??2005-10-19?15:33??OBJLoader\OBJLoader.plg
?????文件??????11691??2005-10-19?15:33??OBJLoader\OBJLoader.rc
?????文件???????2081??2005-10-19?15:33??OBJLoader\OBJLoaderDoc.cpp
?????文件???????1564??2005-10-19?15:33??OBJLoader\OBJLoaderDoc.h
?????文件??????15340??2005-10-19?15:33??OBJLoader\OBJLoaderView.cpp
?????文件???????2846??2005-10-19?15:33??OBJLoader\OBJLoaderView.h
?????文件???????6212??2005-10-19?15:33??OBJLoader\OBJModels\AIRBOAT.MTL
?????文件?????803192??2005-10-19?15:33??OBJLoader\OBJModels\AIRBOAT.OBJ
?????文件???????6212??2005-10-19?15:33??OBJLoader\OBJModels\CESSNA.MTL
?????文件?????659793??2005-10-19?15:33??OBJLoader\OBJModels\CESSNA.OBJ
?????文件???????6212??2005-10-19?15:33??OBJLoader\OBJModels\FLAMINGO.MTL
?????文件?????804127??2005-10-19?15:33??OBJLoader\OBJModels\FLAMINGO.OBJ
?????文件???????6212??2005-10-19?15:33??OBJLoader\OBJModels\PORSCHE.MTL
?????文件?????788143??2005-10-19?15:33??OBJLoader\OBJModels\PORSCHE.OBJ
?????文件???????6212??2005-10-19?15:33??OBJLoader\OBJModels\SHUTTLE.MTL
?????文件??????47524??2005-10-19?15:33??OBJLoader\OBJModels\SHUTTLE.OBJ
?????文件???????6212??2005-10-19?15:33??OBJLoader\OBJModels\X29.MTL
............此處省略17個文件信息
- 上一篇:SD卡入門詳細資料入門必備喔
- 下一篇:密碼管理小程序,可實現新舊密碼更改
評論
共有 條評論