Matrix4x4.CreateViewport Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om