当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 这里是例子代码:http://www.terathon.com/
 

 

    摘要:原文参考: http://www.lua.org/pil/index.html翻译本文章是个人爱好lua所至,转载请注明出处和作者.版权归原作者所有,未经允许不得将文章用于商业目的,否则造成的一切后果由该组织或个人承担,本人不承担任何法律及连带责任.请自觉遵守.8.compilation, execution, and errors 虽然我们把lua当作解释型语言,但是lua会首先把代码预编译成中......
    摘要:原文参考: http://www.lua.org/pil/index.html翻译本文章是个人爱好lua所至,转载请注明出处和作者.版权归原作者所有,未经允许不得将文章用于商业目的,否则造成的一切后果由该组织或个人承担,本人不承担任何法律及连带责任.请自觉遵守.6.more about functionslua中的函数是带有词法定界(lexical scoping)的第一类值(first-clas......


Oblique Frustum Clipping
这里是例子代码:

http://www.terathon.com/code/oblique.html 【程序编程相关:关卡设计的艺术

【推荐阅读:openGL之RedBook精要(一)

【扩展信息:网络游戏同步

具体的说明可以参见 http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=6;t=000170

其重要部分摘录如下:

let p = (px, py, pz, pw) be the eye-space plane to which you would like to clip.

this will replace your ordinary near plane and should be facing away from the

camera, so pz < 0.

let q be an eye-space point. if p dot q = 0, then q lies on the plane p.

what we want to do is modify the projection matrix m so that points q for

which p dot q = 0 get transformed in such a way that the transformed z-coordinate

is the negation of the transformed w-coordinate. this corresponds to

the projected z-coordinate that you would ordinarily get for a point lying

on the near plane. after division by the w-coordinate, you get -1.

the projection matrix m transforms points from eye space into homogeneous clip

space. to obtain the clip-space plane p, we need to multiply p by the inverse


...   下一页
    摘要: 通向天才之路 : 2d引擎图底层图形模块分析 我记得从看灌蓝高手开始,我就喜欢上了樱木花道这个角色.这个四肢发达头脑简单的单细胞动物身上有种说不清楚的可爱,特别是那种练习时候的认真努力和在别人面前炫耀时候大声笑着说:"我果然是天才".试想一下,csdn之中有几人做的到如此率真. 许多人认为程序员应该谦虚,应该低调一点.但是这种想法是在是让我觉得很好笑呢,那些人有没有想过为什么?......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE