Editare

Partajați prin


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

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