Matrix4x4.CreatePerspective(Single, Single, Single, Single) Method

Definition

Создает матрицу перспективы на основе данных размеров отображаемого объема.Creates a perspective projection matrix from the given view volume dimensions.

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

Parameters

width
Single

Ширина отображаемого объема в ближней плоскости просмотра.The width of the view volume at the near view plane.

height
Single

Высота отображаемого объема в ближней плоскости просмотра.The height of the view volume at the near view plane.

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

Значение 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