Matrix.CreatePerspectiveFieldOfView Method (Single, Single, Single, Single)
Builds a perspective projection matrix based on a field of view and returns by value.
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework.Math (in Microsoft.Xna.Framework.Math.dll)
public static Matrix CreatePerspectiveFieldOfView( float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance )
Parameters
- fieldOfView
- Type: System.Single
Field of view in the y direction, in radians.
- aspectRatio
- Type: System.Single
Aspect ratio, defined as view space width divided by height.
- nearPlaneDistance
- Type: System.Single
Distance to the near view plane.
- farPlaneDistance
- Type: System.Single
Distance to the far view plane.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | One of the following conditions is true:
|
Projection space refers to the space after applying projection transformation from view space. After the projection transformation, visible content has x- and y-coordinates ranging from −1 to 1, and a z-coordinate ranging from 0 to 1.
To obtain the viewable area (in world space) of a scene, create a BoundingFrustum and pass the combined view and projection matrix to the constructor.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.