Matrix4.CreatePerspectiveFieldOfView 方法

定义

重载

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

创建透视投影矩阵。

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

参数

fovy
Single
aspect
Single
zNear
Single
zFar
Single

返回

适用于

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

创建透视投影矩阵。

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

参数

fovy
Single

y 方向的视场角度 (弧度)

aspect
Single

视图的纵横比 (宽度/高度)

zNear
Single

到近剪裁平面的距离

zFar
Single

到远剪裁平面的距离

result
Matrix4

将相机空间转换为光栅空间的投影矩阵

例外

在以下条件下引发:

  • fovy 为零,小于零或大于 Math.PI
  • aspect 为负或零
  • zNear 为负数或零
  • zFar 为负数或零
  • zNear 大于 zFar

适用于