Matrix4.CreatePerspectiveFieldOfView Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreatePerspectiveFieldOfView(Single, Single, Single, Single) | |
CreatePerspectiveFieldOfView(Single, Single, Single, Single, Matrix4) |
Creates a perspective projection matrix. |
CreatePerspectiveFieldOfView(Single, Single, Single, Single)
CreatePerspectiveFieldOfView(Single, Single, Single, Single, Matrix4)
Creates a perspective projection matrix.
public static void CreatePerspectiveFieldOfView (float fovy, float aspect, float zNear, float zFar, out OpenTK.Matrix4 result);
static member CreatePerspectiveFieldOfView : single * single * single * single * -> unit
Parameters
- fovy
- Single
Angle of the field of view in the y direction (in radians)
- aspect
- Single
Aspect ratio of the view (width / height)
- zNear
- Single
Distance to the near clip plane
- zFar
- Single
Distance to the far clip plane
- result
- Matrix4
A projection matrix that transforms camera space to raster space
Exceptions
Thrown under the following conditions:
- fovy is zero, less than zero or larger than Math.PI:
- aspect is negative or zero:
- zNear is negative or zero:
- zFar is negative or zero:
- zNear is larger than zFar: