-
大小: 362KB文件类型: .rar金币: 2下载: 0 次发布日期: 2021-06-11
- 语言: C/C++
- 标签: openGL 3ds模型 3D Exploration
资源简介
该程序实现三维模型在MFC视图窗口显示,首先利用3D Exploration软件将3ds模型生成cpp文件,再将cpp代码移植到MFC单文档应用程序中。
代码片段和文件信息
// 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 属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 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个文件信息
- 上一篇:一个步态识别 软件
- 下一篇:三菱PLC 串口通信程序
相关资源
- 3des加密算法C语言实现
- C语言版3D魔方游戏源代码
- 安卓c语言开发SDL2+opengles
- 交互式计算机图形学 第六版 OpenGL源代
- VC++基于OpenGL模拟的一个3维空间模型
- opencv2 3D标定.cpp
- opengl绘制汽车.cpp
- opengl实现水流效果sph
- opengl源代码,全是精华!
- OpenGL迷宫山东大学图形学实验三
- opengl的立方体消隐算法
- vc++ opengl代码爆炸
- 我见过最漂亮的CS仿真程序openGL和C+
- 3DES加密算法C++实现
- DES/3DES算法C语言实现
- DES和3DES加密算法,C语言,适用于单片
- 广东某工业大学的openGL课程设计
- 使用OpenGL实现多个小球在密闭空间内
- 利用openGL和C++实现光线跟踪绘图的完
- OpenGl C++太阳系小行星运行系统 可切换
- vc++和OpenGL实现三维地形实时动态显示
- C++实现利用OpenGL实现三维绘图
- Frangi最初提出的Hessian矩阵血管增强,
- 太阳、地球、月亮之间的运动图Open
- MFC 单文档 实现opengl 三维旋转 缩放
- OPENGL的烟花程序(代码)
- 导入3dmax模型的VC++程序
- MFC+OpenGL三维建模与动画显示
- 基于opengl粒子系统实现喷泉的模拟
- 一个基于openGL的太阳系模型,太阳地
川公网安备 51152502000135号
评论
共有 条评论