已知
- Fov
- Aspect = Width / Height
- 构造如下三角形,分别为视锥体的垂直切面,水平切面
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的角度了
网友评论