- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
AngelCG09图形学
Angel: Interactive Computer Graphics 4E ? Addison-Wesley 2005 Better Interactive Programs Shandong University Software College Instructor: Xu Yanning E-mail: xyn@sdu.edu.cn Objectives Learn to build more sophisticated interactive programs using Picking Select objects from the display Three methods Rubberbanding Interactive drawing of lines and rectangles Display Lists Retained mode graphics Picking Identify a user-defined object on the display In principle, it should be simple because the mouse gives the position and we should be able to determine to which object(s) a position corresponds Practical difficulties Pipeline architecture is feed forward, hard to go from screen back to world Complicated by screen being 2D, world is 3D How close do we have to come to object to say we selected it? 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 Rendering Modes –Method1 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 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 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 Selection Mode and Picking As w
您可能关注的文档
最近下载
- 不锈钢管道安装施工与方案.doc VIP
- 喜茶运营管理手册和员工操作管理手册.doc VIP
- 施工总包合同.docx VIP
- 土木专业英国规范NA to BS EN 1991-1-4_2005+A1_2010.pdf VIP
- 软件风险管理计划.docx VIP
- 2024年秋季人教版7年级上册数学全册教学课件(新教材).pptx
- 中山市八年级下期末考试数学试题(有答案)-精品 .pdf VIP
- Module10 Unit 2 Don’t shout please!(教案)外研版(三起)英语五年级上册1.docx VIP
- 顶格筹码峰与平均成本双线合一选股公式.docx VIP
- Module 10 Unit 2 Don’t shout, please! (教案)外研版(三起)英语五年级上册1.docx VIP
文档评论(0)