Прочитај на енглеском Уреди

Делите путем


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

Definition

Creates a perspective projection matrix from the given view volume dimensions.

C#
public static System.Numerics.Matrix4x4 CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance);

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

The perspective projection matrix.

Exceptions

nearPlaneDistance is less than or equal to zero.

-or-

farPlaneDistance is less than or equal to zero.

-or-

nearPlaneDistance is greater than or equal to farPlaneDistance.

Applies to

Производ Верзије
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1
UWP 10.0