Matrix4x4.CreateViewport 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從指定的參數建立一個右手視口矩陣。
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
觀察窗最大深度。
傳回
右手視窗矩陣。
備註
視窗矩陣 |寬度 / 2 |0 |0 |0 | |0 |-height / 2 |0 |0 | |0 |0 |minDepth - 最大深度 |0 | |x + 寬度 / 2 |y + 高度 / 2 |最小深度 |1 |