語言

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

適用於