采用OpenGL技术在VC6.0平台下,显示IGM机械臂的实例源码。现将机械臂的三维模型转换为C++可读取的头文件,之后采用列表显示技术将模型以三维状态显示,可旋转。喜欢的朋友可以下载
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 20113 2015-12-01 10:05 机器人臂DebugMainFrm.obj
文件 8028252 2015-12-01 13:23 机器人臂DebugSDOpenGL.exe
文件 406888 2015-12-01 13:23 机器人臂DebugSDOpenGL.ilk
文件 23246 2015-12-01 10:05 机器人臂DebugSDOpenGL.obj
文件 5813976 2015-12-01 10:05 机器人臂DebugSDOpenGL.pch
文件 476160 2015-12-01 13:23 机器人臂DebugSDOpenGL.pdb
文件 7344 2011-10-20 18:18 机器人臂DebugSDOpenGL.res
文件 15029 2015-12-01 10:05 机器人臂DebugSDOpenGLDoc.obj
文件 6613451 2015-12-01 13:23 机器人臂DebugSDOpenGLView.obj
文件 107425 2015-12-01 10:05 机器人臂DebugStdAfx.obj
文件 361472 2017-12-25 16:16 机器人臂Debugvc60.idb
文件 372736 2015-12-01 13:23 机器人臂Debugvc60.pdb
文件 27670 2000-12-13 00:22 机器人臂glut.h
文件 2509 2002-10-17 19:13 机器人臂MainFrm.cpp
文件 1581 2002-10-17 19:13 机器人臂MainFrm.h
文件 4361 2002-10-17 19:13 机器人臂ReadMe.txt
文件 1078 2002-10-17 19:13 机器人臂RESSDOpenGL.ico
文件 400 2002-10-17 19:13 机器人臂RESSDOpenGL.rc2
文件 1078 2002-10-17 19:13 机器人臂RESSDOpenGLDoc.ico
文件 1078 2002-10-17 19:13 机器人臂RESToolbar.bmp
文件 496 2002-10-17 19:13 机器人臂Resource.h
文件 1623766 2015-12-01 09:36 机器人臂ROBAX1.h
文件 13621337 2015-12-01 11:30 机器人臂ROBOT.h
文件 28756 2011-10-21 14:10 机器人臂SDOpenGL.aps
文件 2322 2011-10-21 14:47 机器人臂SDOpenGL.clw
文件 4245 2002-10-17 19:13 机器人臂SDOpenGL.cpp
文件 4674 2016-10-11 11:49 机器人臂SDOpenGL.dsp
文件 541 2002-10-17 19:13 机器人臂SDOpenGL.dsw
文件 1384 2002-10-17 19:13 机器人臂SDOpenGL.h
文件 246784 2017-12-25 16:17 机器人臂SDOpenGL.ncb
............此处省略15个文件信息
// MainFrm.cpp : implementation of the CMainframe class
//
#include “stdafx.h“
#include “SDOpenGL.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
“);
return -1; // fail to create
}
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators
sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed to create status bar
“);
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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 20113 2015-12-01 10:05 机器人臂DebugMainFrm.obj
文件 8028252 2015-12-01 13:23 机器人臂DebugSDOpenGL.exe
文件 406888 2015-12-01 13:23 机器人臂DebugSDOpenGL.ilk
文件 23246 2015-12-01 10:05 机器人臂DebugSDOpenGL.obj
文件 5813976 2015-12-01 10:05 机器人臂DebugSDOpenGL.pch
文件 476160 2015-12-01 13:23 机器人臂DebugSDOpenGL.pdb
文件 7344 2011-10-20 18:18 机器人臂DebugSDOpenGL.res
文件 15029 2015-12-01 10:05 机器人臂DebugSDOpenGLDoc.obj
文件 6613451 2015-12-01 13:23 机器人臂DebugSDOpenGLView.obj
文件 107425 2015-12-01 10:05 机器人臂DebugStdAfx.obj
文件 361472 2017-12-25 16:16 机器人臂Debugvc60.idb
文件 372736 2015-12-01 13:23 机器人臂Debugvc60.pdb
文件 27670 2000-12-13 00:22 机器人臂glut.h
文件 2509 2002-10-17 19:13 机器人臂MainFrm.cpp
文件 1581 2002-10-17 19:13 机器人臂MainFrm.h
文件 4361 2002-10-17 19:13 机器人臂ReadMe.txt
文件 1078 2002-10-17 19:13 机器人臂RESSDOpenGL.ico
文件 400 2002-10-17 19:13 机器人臂RESSDOpenGL.rc2
文件 1078 2002-10-17 19:13 机器人臂RESSDOpenGLDoc.ico
文件 1078 2002-10-17 19:13 机器人臂RESToolbar.bmp
文件 496 2002-10-17 19:13 机器人臂Resource.h
文件 1623766 2015-12-01 09:36 机器人臂ROBAX1.h
文件 13621337 2015-12-01 11:30 机器人臂ROBOT.h
文件 28756 2011-10-21 14:10 机器人臂SDOpenGL.aps
文件 2322 2011-10-21 14:47 机器人臂SDOpenGL.clw
文件 4245 2002-10-17 19:13 机器人臂SDOpenGL.cpp
文件 4674 2016-10-11 11:49 机器人臂SDOpenGL.dsp
文件 541 2002-10-17 19:13 机器人臂SDOpenGL.dsw
文件 1384 2002-10-17 19:13 机器人臂SDOpenGL.h
文件 246784 2017-12-25 16:17 机器人臂SDOpenGL.ncb
............此处省略15个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)