资源简介
z-buffer算法进阶是扫描线算法,再进一步就是区间扫描线算法,这是图形学基本算法。这里面是vs2015的项目,里面附赠了多个obj模型。先从obj模型读取开始,到最后的显示。

代码片段和文件信息
#include
#include “Vec.h“
#include “utils.h“
#include “Model.h“
#include “SectionScanLine.h“
#include “Render.h“
#include
using namespace std;
string path = “../models“;
vector fileNames;
string getfilename() {
fileNames = getListFiles(path “*.obj“);
cout << “choose one:\n**************************“ << endl;
for (int i = 0; i < fileNames.size(); ++i)
{
cout << i + 1 << “:“ << fileNames[i].c_str() << endl;
}
cout << “**************************“ << endl;
cout << “choose now:“;
int fileID;
while (true) {
cin >> fileID;
if (fileID >= fileNames.size() || fileID <= 0)
cout << “choose errortry again:“ << endl;
else
return fileNames[fileID - 1];
}
}
int main()
{
// 读取模型
string fileName = path + “/“+ getfilename();
Model model(fileName);
//窗口大小
int width = 1000 height = 800;
SectionScanLine sectionScanLine;
sectionScanLine.setSize(width height);
// 运行算法
sectionScanLine.start(model);
Render render(&model §ionScanLine);
render.display();
return 0;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-12-28 14:09 section_z-buffer\
目录 0 2017-12-13 17:41 section_z-buffer\.vs\
目录 0 2017-12-07 20:55 section_z-buffer\.vs\ScanLineZBuffer\
目录 0 2017-12-07 20:55 section_z-buffer\.vs\ScanLineZBuffer\v14\
文件 61952 2017-12-07 17:02 section_z-buffer\.vs\ScanLineZBuffer\v14\.suo
目录 0 2017-12-08 09:39 section_z-buffer\.vs\SectionScanLineZbuffer\
目录 0 2017-12-08 09:39 section_z-buffer\.vs\SectionScanLineZbuffer\v14\
文件 62464 2017-12-28 14:09 section_z-buffer\.vs\SectionScanLineZbuffer\v14\.suo
目录 0 2017-12-14 20:41 section_z-buffer\Debug\
文件 356352 2017-12-07 21:08 section_z-buffer\Debug\ScanLineZBuffer.exe
文件 1518732 2017-12-07 21:08 section_z-buffer\Debug\ScanLineZBuffer.ilk
文件 3166208 2017-12-07 21:08 section_z-buffer\Debug\ScanLineZBuffer.pdb
文件 360960 2017-12-13 17:33 section_z-buffer\Debug\ScanLineZBuffer_modi.exe
文件 1305372 2017-12-13 17:33 section_z-buffer\Debug\ScanLineZBuffer_modi.ilk
文件 6696960 2017-12-13 17:33 section_z-buffer\Debug\ScanLineZBuffer_modi.pdb
文件 323584 2017-12-15 12:51 section_z-buffer\Debug\SectionScanLineZbuffer.exe
文件 1445528 2017-12-15 12:51 section_z-buffer\Debug\SectionScanLineZbuffer.ilk
文件 3534848 2017-12-15 12:51 section_z-buffer\Debug\SectionScanLineZbuffer.pdb
目录 0 2017-12-15 12:51 section_z-buffer\ScanLineZBuffer\
目录 0 2017-12-15 12:51 section_z-buffer\ScanLineZBuffer\Debug\
文件 462774 2017-12-13 11:10 section_z-buffer\ScanLineZBuffer\Debug\Display.obj
文件 669759 2017-12-14 20:41 section_z-buffer\ScanLineZBuffer\Debug\Model.obj
文件 61372 2017-12-13 18:54 section_z-buffer\ScanLineZBuffer\Debug\Rasterizer.obj
文件 102792 2017-12-15 12:51 section_z-buffer\ScanLineZBuffer\Debug\Render.obj
目录 0 2017-12-13 17:33 section_z-buffer\ScanLineZBuffer\Debug\ScanLine.E16269B4.tlog\
文件 5306 2017-12-13 17:33 section_z-buffer\ScanLineZBuffer\Debug\ScanLine.E16269B4.tlog\CL.command.1.tlog
文件 85124 2017-12-13 17:33 section_z-buffer\ScanLineZBuffer\Debug\ScanLine.E16269B4.tlog\CL.read.1.tlog
文件 8458 2017-12-13 17:33 section_z-buffer\ScanLineZBuffer\Debug\ScanLine.E16269B4.tlog\CL.write.1.tlog
文件 212 2017-12-13 17:33 section_z-buffer\ScanLineZBuffer\Debug\ScanLine.E16269B4.tlog\ScanLineZBuffer_modi.lastbuildstate
文件 2512 2017-12-13 17:33 section_z-buffer\ScanLineZBuffer\Debug\ScanLine.E16269B4.tlog\li
文件 5472 2017-12-13 17:33 section_z-buffer\ScanLineZBuffer\Debug\ScanLine.E16269B4.tlog\li
............此处省略75个文件信息
- 上一篇:学生评语管理系统3.5
- 下一篇:污水处理系统自控系统设计
相关资源
- MFC读三维模型obj文件
-
AutoCAD ob
jectARX二次开发实例-状态栏 - objc-io中文书籍6本全集2019epud.zip
-
Selenium使用Pageob
ject模式测试登陆页 -
官网swfob
ject - 最新 objc APP 架构
- Fraction分数的约分及四则运算
- 华南理工大学软件学院计算机图形学
-
翻译:ob
ject Tracking: A Survey,物体跟 -
Effective ob
jective-C 2.0 -
SuperMap ob
jects 服务区分析 -
SuperMap ob
jects 综合救援调度 - OpenGl读取obj格式文件
- OPENGL读取obj模型_visual stdio2015
- 驱动开发工具=DebugView+DriverMonitor+IRP
- 计算机图形学 z-buffer
-
org.json.JSONob
ject引用依赖包 - opengl 读取与显示obj文件
- three.js加载obj+mtl文件源码
- objccn-app-architecture,pdf epub mobi App架构
-
Remob
jects Hydra for Delphi V3.0.39.777 ful -
The art of me
taob ject protocol - objdata.zip
- Objc中国--函数式Swift4.0版本
- The Complete Friday Q&A: Volume I
- Objc中国 APP 架构 完整版
-
ob
jectARX帮助文档 - 逆向工程从ObjC到Swift
- MapGIS二次开发源代码
- objc中国 CoreData swift4 版本 epub
评论
共有 条评论