首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络游戏 >

d3d里怎么计算2个物体间距离

2012-02-21 
d3d里如何计算2个物体间距离是从物体自己的世界矩阵里面取值然后运算吗?公式是这个?The distance between

d3d里如何计算2个物体间距离
是从物体自己的世界矩阵里面取值然后运算吗?
公式是这个?
The distance between two points <Ax,Ay,Az> and <Bx,By,Bz> can be found by again using the pythagorus theorem:
dx = Ax-Bx
dy = Ay-By
dz = Az-Bz
distance = sqrt(dx*dx + dy*dy + dz*dz)

[解决办法]
这是数学问题,跟D3D没关系
[解决办法]

探讨
是从物体自己的世界矩阵里面取值然后运算吗?
公式是这个?
The distance between two points <Ax,Ay,Az> and <Bx,By,Bz> can be found by again using the pythagorus theorem:
dx = Ax-Bx
dy = Ay-By
dz = Az-Bz
distance = sqrt(dx*dx ……

[解决办法]
这个问题不难思考吧

热点排行