Matrix4x4.CreatePerspectiveFieldOfView(Single, Single, Single, Single) Method

Definition

Создает матрицу перспективы на основе поля зрения, пропорций и расстояния до ближней и дальней плоскости просмотра.Creates a perspective projection matrix based on a field of view, aspect ratio, and near and far view plane distances.

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

Parameters

fieldOfView
Single

Поле зрения в направлении Y в радианах.The field of view in the y direction, in radians.

aspectRatio
Single

Пропорции, определенные как ширина зрительного пространства, деленная на высоту.The aspect ratio, defined as view space width divided by height.

nearPlaneDistance
Single

Расстояние до ближней плоскости просмотра.The distance to the near view plane.

farPlaneDistance
Single

Расстояние до дальней плоскости просмотра.The distance to the far view plane.

Returns

Matrix4x4

Матрица перспективы.The perspective projection matrix.

Exceptions

Значение fieldOfView не больше нуля.fieldOfView is less than or equal to zero.

-или--or- Значение fieldOfView больше или равно PI.fieldOfView is greater than or equal to PI.

Значение nearPlaneDistance не больше нуля.nearPlaneDistance is less than or equal to zero.

-или--or- Значение farPlaneDistance не больше нуля.farPlaneDistance is less than or equal to zero.

-или--or- Значение nearPlaneDistance больше или равно farPlaneDistance.nearPlaneDistance is greater than or equal to farPlaneDistance.

Applies to