- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
计算机图形学computer graphics课件9知识课件.ppt
1
Better Interactive Programs
Yuanfeng Zhou
Shandong University
4
Three Approaches
Hit list
Most general approach but most difficult to implement
Use back or some other buffer to store object ids as the objects are rendered
Rectangular maps
Easy to implement for many applications
See paint program in text
5
Rendering Modes
OpenGL can render in one of three modes selected by glRenderMode(mode)
GL_RENDER: normal rendering to the frame buffer (default)
GL_FEEDBACK: provides list of primitives rendered but no output to the frame buffer
GL_SELECTION: Each primitive in the view volume generates a hit record that is placed in a name stack which can be examined later
6
Selection Mode Functions
glSelectBuffer(): specifies name buffer
glInitNames(): initializes name buffer
glPushName(id): push id on name buffer
glPopName(): pop top of name buffer
glLoadName(id): replace top name on buffer
id is set by application program to identify objects
7
Using Selection Mode
Initialize name buffer
Enter selection mode (using mouse)
Render scene with user-defined identifiers
Reenter normal render mode
This operation returns number of hits
Examine contents of name buffer (hit records)
Hit records include id and depth information
8
Selection Mode and Picking
As we just described it, selection mode won’t work for picking because every primitive in the view volume will generate a hit
Change the viewing parameters so that only those primitives near the cursor are in the altered view volume
Use gluPickMatrix (see text for details)
9
Using Regions of the Screen
Many applications use a simple rectangular arrangement of the screen
Example: paint/CAD program
Easier to look at mouse position and determine which area of screen it is in than using selection mode picking
drawing area
tools
menus
10
Using another buffer and colors for picking
For a small number of objects, we can assign a unique color (often in color index mode) to each object
We then render the scene to a color buffer other than the f
您可能关注的文档
- 言语中的知识与体验年学业考试思考录温州市教育教学知识讲稿.ppt
- 言语沟通技巧课件复习课程.ppt
- 言语理解与表达练习题讲解教材课程.ppt
- 言语矫治教学案例.ppt
- 言语训练康复治疗技术教学幻灯片.ppt
- 言语障碍评定与康复教学幻灯片.ppt
- 詹姆斯庄园葡萄酒产品上市策划方案讲义资料.ppt
- 課程統整與全方位教學知识讲稿.ppt
- 證券業職場概況讲义资料.ppt
- 警务监督演示教学.ppt
- 实验室危废随意倾倒查处规范.ppt
- 实验室危废废液处理设施规范.ppt
- 实验室危废处置应急管理规范.ppt
- 初中地理中考总复习精品教学课件课堂讲本 基础梳理篇 主题10 中国的地理差异 第20课时 中国的地理差异.ppt
- 初中地理中考总复习精品教学课件课堂讲本 基础梳理篇 主题10 中国的地理差异 第21课时 北方地区.ppt
- 危险废物处置人员防护培训办法.ppt
- 危险废物处置隐患排查技术指南.ppt
- 2026部编版小学数学二年级下册期末综合学业能力测试试卷(3套含答案解析).docx
- 危险废物处置违法案例分析汇编.ppt
- 2026部编版小学数学一年级下册期末综合学业能力测试试卷3套精选(含答案解析).docx
原创力文档


文档评论(0)