Matrix4.CreatePerspectiveFieldOfView Method

Definition

Overloads

CreatePerspectiveFieldOfView(Single, Single, Single, Single)
CreatePerspectiveFieldOfView(Single, Single, Single, Single, Matrix4)

Creates a perspective projection matrix.

CreatePerspectiveFieldOfView(Single, Single, Single, Single)

public static OpenTK.Matrix4 CreatePerspectiveFieldOfView (float fovy, float aspect, float zNear, float zFar);
static member CreatePerspectiveFieldOfView : single * single * single * single -> OpenTK.Matrix4

Parameters

fovy
Single
aspect
Single
zNear
Single
zFar
Single

Returns

Applies to

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:

Applies to