Matrix4x4.CreatePerspective(Single, Single, Single, Single) 方法

定义

从给定视图体维度创建透视投影矩阵。

public:
 static System::Numerics::Matrix4x4 CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance);
public static System.Numerics.Matrix4x4 CreatePerspective (float width, float height, float nearPlaneDistance, float farPlaneDistance);
static member CreatePerspective : single * single * single * single -> System.Numerics.Matrix4x4
Public Shared Function CreatePerspective (width As Single, height As Single, nearPlaneDistance As Single, farPlaneDistance As Single) As Matrix4x4

参数

width
Single

视图体在近视图平面上的宽度。

height
Single

视图体在近视图平面上的高度。

nearPlaneDistance
Single

与近视图平面之间的距离。

farPlaneDistance
Single

与远视图平面之间的距离。

返回

透视投影矩阵。

例外

nearPlaneDistance 小于或等于零。

- 或 -

farPlaneDistance 小于或等于零。

- 或 -

nearPlaneDistance 大于或等于 farPlaneDistance

适用于