共用方式為


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

適用於