Hi everyone,
can you tell me which Field of view is returned by ICameraSceneNode::getFOV(), Horizontal or vertical or is that in irrlicht the same?
FOV horizontal, vertical
-
- Posts: 62
- Joined: Wed Feb 06, 2013 12:11 pm
Re: FOV horizontal, vertical
Well it seems to be the horizontal FOV, but how do I get the vertical FOV?
Re: FOV horizontal, vertical
Based on my experiments, the camera FOV appears to be diagonal. See my recent post about horizon in 2D. There is a code snipped in there to get the H and V component of camera FOV as well.
Re: FOV horizontal, vertical
I have just tested. setFov set Vertical FOV (Irrlicht 1.8.1), for sure
Re: FOV horizontal, vertical
Congratulation, you've just been awarded the "Post Necromancer" achievement.
While we're at it... setFOV() and getFOV() respectively sets and return the vertical field of view (in radians). When you create a camera, it's initialized at "PI / 2.5". You can set the vertical field of view with setFOV(). This causes the view area's projection matrix to be recalculated using buildProjectionMatrixPerspectiveFovLH(), which automatically scales the horizontal fov based on the aspect ratio.
While we're at it... setFOV() and getFOV() respectively sets and return the vertical field of view (in radians). When you create a camera, it's initialized at "PI / 2.5". You can set the vertical field of view with setFOV(). This causes the view area's projection matrix to be recalculated using buildProjectionMatrixPerspectiveFovLH(), which automatically scales the horizontal fov based on the aspect ratio.