Re: [cpp] 请假D3D中碰撞检测问题

卢立璵(bad_fish) luliyi1024 at gmail.com
Wed Mar 29 16:40:50 CST 2006


1、把鼠标坐标在屏幕坐标上的点转换为世界坐标(反乘一个投影矩阵)。
2、从这个点发射一条射线到无穷远处(viewto-eye 的矢量作为方向)。
3、判断这条射线和模型中每个三角形的相交情况(Intersect)。


On 3/29/06, 苏益ꪏ <sdyredwolf at tom.com> wrote:
>
> 似乎可以用D3DXIntersect函数完成。
> 但我写的飞机游戏中,只有一个Mesh模型(分别放到N个地方)。
>
> 现在我想实现,判断鼠标是否对准了其中一辆飞机,请问如何实现?
> 大致思路或者方向就行,麻烦大家了。
>
>
>
>
>   ===============================================
> 快来和我一起享受TOM免费邮箱吧! 看看除了1.5G,还有什么?<http://bjcgi.163.net/cgi-bin/newreg.cgi?%0Arf=050602>
>
> <http://vip.tom.com/info/ggd_050409/index.html>    敲开精彩 聊天世界<http://chat.tom.com/>
> :网通用户 <http://chat.tom.com/> 电信用户 <http://schat.tom.com/>
>
> 明星送祝福(http://sr.tom.com): 周杰伦 <http://sr.tom.com/send.php?id=330&type=2>
> 蔡依林 <http://sr.tom.com/send.php?id=315&type=2>  王力宏<http://sr.tom.com/send.php?id=257&type=2>
> 田震 <http://sr.tom.com/send.php?id=247&type=2> &nbsp代您送去生日祝福
>
> 万首金曲免费送(http://mm.tom.com/ivr/) : 你到底爱谁
> <http://fs.tom.com/sms/ivr_song_step0.php?%0Avar=1&id=37987&user_id=3&code_id=iw4001&>
> 千年之恋<http://fs.tom.com/sms/ivr_song_step0.php?%0Avar=1&id=38205&user_id=3&code_id=iw4001&>
> 我是真的爱你
> <http://fs.tom.com/sms/ivr_song_step0.php?%0Avar=1&id=37938&user_id=3&code_id=is0001&>
> 一辈子做你的女孩
> <http://fs.tom.com/sms/ivr_song_step0.php?%0Avar=1&id=1431&user_id=3&code_id=iw4001&>
>
> 全部彩铃免费送(http://mm.tom.com/cailing/): 我发财了发财了<http://fs.tom.com/sms/cailing_step0.php?%0Avar=1&id=462&songtype=1&user_id=3&code_id=000000&songprovince=甘肃&>
> 你喜欢我就说嘛<http://fs.tom.com/sms/cailing_step0.php?%0Avar=1&id=300&songtype=1&user_id=3&code_id=000000&songprovince=北京&>
> 两只蝴蝶
> <http://fs.tom.com/sms/cailing_step0.php?%0Avar=1&id=1345&songtype=0&user_id=3&code_id=&songprovince=北京&>
> 冲动的惩罚
> <http://fs.tom.com/sms/cailing_step0.php?%0Avar=1&id=376&songtype=0&user_id=3&code_id=&songprovince=北京&>
> ===============================================
>
> _______________________________________________
> Cpp mailing list
> Cpp at codingnow.com
> http://codingnow.com/mailman/listinfo/cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codingnow.com/pipermail/cpp/attachments/20060329/59fba1e4/attachment.html


More information about the Cpp mailing list