Uredi

Deli z drugimi prek


Matrix4x4.CreateViewport Method

Definition

Creates a right-handed viewport matrix from the specified parameters.

public:
 static System::Numerics::Matrix4x4 CreateViewport(float x, float y, float width, float height, float minDepth, float maxDepth);
public static System.Numerics.Matrix4x4 CreateViewport (float x, float y, float width, float height, float minDepth, float maxDepth);
static member CreateViewport : single * single * single * single * single * single -> System.Numerics.Matrix4x4
Public Shared Function CreateViewport (x As Single, y As Single, width As Single, height As Single, minDepth As Single, maxDepth As Single) As Matrix4x4

Parameters

x
Single

X coordinate of the viewport upper left corner.

y
Single

Y coordinate of the viewport upper left corner.

width
Single

Viewport width.

height
Single

Viewport height.

minDepth
Single

Viewport minimum depth.

maxDepth
Single

Viewport maximum depth.

Returns

The right-handed viewport matrix.

Remarks

Viewport matrix | width / 2 | 0 | 0 | 0 | | 0 | -height / 2 | 0 | 0 | | 0 | 0 | minDepth - maxDepth | 0 | | x + width / 2 | y + height / 2 | minDepth | 1 |

Applies to