求解投影视锥体水平夹角Foh

2017-11-11  本文已影响36人  晓龙酱

已知

triangle.jpg
tan(Fov/2) = (H/2) / Near
=> H = 2 * Near * tan(Fov/2)

Aspect = W / H
=> W = H * Aspect
=> W = 2 * Near * tan(Fov/2) * Aspect

tan(Foh/2) = (W/2) / Near 
= 2 * Near * tan(Fov/2) * Aspect / Near
= 2 * Aspect * tan(Fov/2)

最后根据反三角函数,就可以计算出Foh的角度了
上一篇下一篇

猜你喜欢

热点阅读