Bagikan melalui


Matrix4x4.CreateViewport Metode

Definisi

Membuat matriks viewport tangan kanan dari parameter yang ditentukan.

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

Parameter

x
Single

Koordinat X sudut kiri atas viewport.

y
Single

Koordinat Y dari sudut kiri atas viewport.

width
Single

Lebar viewport.

height
Single

Tinggi viewport.

minDepth
Single

Lihatpor kedalaman minimum.

maxDepth
Single

Kedalaman maksimum viewport.

Mengembalikan

Matriks viewport tangan kanan.

Keterangan

Matriks viewport | lebar / 2 | 0 | 0 | 0 | | 0 | -tinggi / 2 | 0 | 0 | | 0 | 0 | minDepth - maxDepth | 0 | | x + lebar / 2 | y + tinggi / 2 | minDepth | 1 |

Berlaku untuk