Matrix4x4.CreateViewport 方法

定义

从指定的参数创建右手视区矩阵。

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

参数

x
Single

视区左上角的 X 坐标。

y
Single

视区左上角的 Y 坐标。

width
Single

视区宽度。

height
Single

视区高度。

minDepth
Single

视区最小深度。

maxDepth
Single

视区最大深度。

返回

右手视区矩阵。

注解

视区矩阵 |width / 2 |0 |0 |0 | |0 |-height / 2 |0 |0 | |0 |0 |minDepth - maxDepth |0 | |x + width / 2 |y + height / 2 |minDepth |1 |

适用于