资源简介
cd7b02a80b63de41fce63008c278aae1.rar
代码片段和文件信息
// DrawScene.cpp: implementation of the CDrawScene class.
//
//////////////////////////////////////////////////////////////////////
#include “stdafx.h“
#include “quhe3Dtrans.h“
#include “DrawScene.h“
#include “gl\gl.h“
#include “gl\glu.h“
#include “quhe3DtransDoc.h“
#include “quhe3DtransView.h“
#include “TransControl.h“
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CDrawScene::CDrawScene()
{
}
CDrawScene::CDrawScene(Cquhe3DtransView *pView)
{
m_pView = pView;
}
CDrawScene::~CDrawScene()
{
}
void CDrawScene::DrawScene()
{
DrawBackground();
CaculateMatrix(); // Caculate the transing matrix.
DrawBall(); // Trans the ball and display.
pClipSpaceobject();
Projectobject();
DrawClipBall();
}
void CDrawScene::DrawBackground()
{
Cquhe3DtransDoc *pDoc = (Cquhe3DtransDoc *)m_pView->GetDocument();
/* Draw Space Axis */
glColor3f(1.0f 0.0f 0.0f);
glBegin(GL_LINES); // X Axis
glVertex3f( 3.0f 0.0f 0.0f);
glVertex3f(-6.0f 0.0f 0.0f);
glEnd();
glColor3f(0.0f 1.0f 0.f);
glBegin(GL_LINES); // Y Axis
glVertex3f( 0.0f 3.0f 0.0f);
glVertex3f( 0.0f -3.0f 0.0f);
glEnd();
glColor3f(0.0f 1.0f 1.0f);
glBegin(GL_LINES); // Z Axis
glVertex3f( 0.0f 0.0f 8.0f);
glVertex3f( 0.0f 0.0f -24.0f);
glEnd();
/* Draw window on YOZ Plane */
glColor3f(1.0f 1.0f 0.0f);
glBegin(GL_LINES);
glVertex3f(0.0 pDoc->winLypDoc->winLz);
glVertex3f(0.0 pDoc->winRypDoc->winLz);
glVertex3f(0.0 pDoc->winRypDoc->winLz);
glVertex3f(0.0 pDoc->winRypDoc->winRz);
glVertex3f(0.0 pDoc->winRypDoc->winRz);
glVertex3f(0.0 pDoc->winLypDoc->winRz);
glVertex3f(0.0 pDoc->winLypDoc->winRz);
glVertex3f(0.0 pDoc->winLypDoc->winLz);
glEnd();
// link eye and window to create space clip box
glColor3f(1.0f 1.0f 0.0f);
glBegin(GL_LINES);
float xyz;
glVertex3f(pDoc->eyeX pDoc->eyeYpDoc->eyeZ);
x = -pDoc->eyeX * 2.5 + pDoc->eyeX;
y = (pDoc->winLy - pDoc->eyeY) * 2.5 + pDoc->eyeY;
z = (pDoc->winLz - pDoc->eyeZ) * 2.5 + pDoc->eyeZ;
glVertex3f(x y z);
glVertex3f(pDoc->eyeX pDoc->eyeYpDoc->eyeZ);
x = -pDoc->eyeX * 2.5 + pDoc->eyeX;
y = (pDoc->winRy - pDoc->eyeY) * 2.5 + pDoc->eyeY;
z = (pDoc->winLz - pDoc->eyeZ) * 2.5 + pDoc->eyeZ;
glVertex3f(x y z);
glVertex3f(pDoc->eyeX pDoc->eyeYpDoc->eyeZ);
x = -pDoc->eyeX * 2.5 + pDoc->eyeX;
y = (pDoc->winRy - pDoc->eyeY) * 2.5 + pDoc->eyeY;
z = (pDoc->winRz - pDoc->eyeZ) * 2.5 + pDoc->eyeZ;
glVertex3f(x y z);
glVertex3f(pDoc->eyeX pDoc->eyeYpDoc->eyeZ);
x = -pDoc->eyeX *
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1507 2008-12-09 17:35 quhe3Dtrans\DrawScene.h
文件 2224 2008-12-09 17:35 quhe3Dtrans\quhe3DtransVIEW.h
文件 2971 2008-12-12 17:24 quhe3Dtrans\quhe3Dtrans.clw
文件 4431 2008-12-09 17:35 quhe3Dtrans\ReadMe.txt
文件 1411 2008-12-09 17:35 quhe3Dtrans\quhe3Dtrans.h
文件 4299 2008-12-09 17:35 quhe3Dtrans\quhe3Dtrans.cpp
文件 1054 2008-12-09 17:35 quhe3Dtrans\StdAfx.h
文件 213 2008-12-09 17:35 quhe3Dtrans\StdAfx.cpp
文件 1104 2008-12-09 17:35 quhe3Dtrans\Resource.h
文件 2006 2008-12-09 17:35 quhe3Dtrans\TransControl.h
文件 7280 2008-12-09 17:35 quhe3Dtrans\quhe3DtransVIEW.cpp
文件 5042 2008-12-09 17:35 quhe3Dtrans\quhe3Dtrans.dsp
文件 545 2008-12-09 17:35 quhe3Dtrans\quhe3Dtrans.dsw
文件 839 2008-12-12 17:25 quhe3Dtrans\quhe3Dtrans.plg
文件 1713 2008-12-09 17:35 quhe3Dtrans\MainFrm.h
文件 3087 2008-12-09 17:35 quhe3Dtrans\MainFrm.cpp
文件 841 2008-12-09 17:35 quhe3Dtrans\TypeDefine.h
文件 167 2008-10-03 19:23 quhe3Dtrans\ClearProjec.bat
文件 29376 2008-12-12 16:54 quhe3Dtrans\quhe3Dtrans.aps
文件 12548 2008-12-09 17:35 quhe3Dtrans\quhe3Dtrans.rc
文件 272896 2008-12-09 17:33 quhe3Dtrans\cg3Dtrans.opt
文件 6884 2008-12-12 17:18 quhe3Dtrans\quhe3DtransDOC.cpp
文件 7482 2008-12-12 17:23 quhe3Dtrans\TransControl.cpp
文件 2561 2008-12-12 17:24 quhe3Dtrans\quhe3DtransDOC.h
文件 17303 2008-12-12 17:25 quhe3Dtrans\DrawScene.cpp
文件 54784 2008-12-12 17:26 quhe3Dtrans\quhe3Dtrans.opt
文件 151647 2008-12-12 17:25 quhe3Dtrans\Debug\quhe3Dtrans.exe
文件 403 2008-12-09 17:35 quhe3Dtrans\res\quhe3Dtrans.rc2
文件 1078 2008-12-09 17:35 quhe3Dtrans\res\quhe3DtransDOC.ico
文件 1078 2008-12-09 17:35 quhe3Dtrans\res\quhe3Dtrans.ico
............此处省略9个文件信息
相关资源
- a6d355e44937795364dd3f1d9d6b8bee.docx
- 虚拟同步机VSG仿真.zip
- 66b557733ace1535d3a4ff36eb748e99.rar
- Quartus链接,及内容展示压缩包3.3G,超
- chopper.exe
- 以弹体坐标系定义A、N的仿真.zip
- ArcgisServer10.7.1许可.rar
- 广联达GQI2021GTJ2021计价6.0最新写锁ID模
- 6机器调度问题.rar
- fafb53a84c697f74f53ba9cdfb39bd29.rar
-
haarcascade_smile.xm
l - LM317恒流源仿真.zip
- 91391db01b6b36ff01eec3012b78d9e4.rar
- 01.知识图谱完整项目实战-不加密.tx
- 密码锁设计.zip
- FOC分数阶控制器+Control.rar
- 定时器.rar
- 电子秤.zip
- 车牌识别数据集.zip
- 4ed996c34edd57c428462a7d60bfb717.txt
- 锐起RDV.rar
- CCBOOT2018破解版.txt
- Visio.txt
- 穆运峰的多线程的.rar
- CACD2000.txt
- ab40efe5bc9a2af4774c553daa8a92f7.pdf
- 千里模块.ec
- MyTCP.zip
- 977d9b69cd1293924c1e274c56d8d842.txt
- pconline1481019109711.zip
评论
共有 条评论