fieldOfView (Tom Miller's Book)

From: Psion (anonymous_at_discussions.microsoft.com)
Date: 05/26/04


Date: Wed, 26 May 2004 09:16:09 -0700

Hi, I've just started reading Tom Miller's book, "Managed DirectX 9 Graphics and Game Programming". Great book by the way. I have seen Tom Miller respond to some on the threads so I'm posting a question here with the hope that he or someone else will answer it. In case you do have the book, I'm referring to page 16-17.

I'm looking at the method, Matrix.ProspectiveFovLH(); The signature is:
System.Single fieldOfView, System.Single aspectRatio, System.Single znearPlane, System.Single zfarPlane

My question is: how do you determine what the fieldOfView angle is?

In an example in the book, Tom writes:

device.Transform.Projection = Matrix.PerspectiveFovLH( (float)Math.PI / 4, this.Width / this.Height, 1.0f, 100.0f);

I understand the last three arguments. But why set the fieldOfView to " (float)Math.PI /4 ] "? Is that just an arbitrary angle chosen? Can one choose any angle one wants?

Thanks,
Prince