Matrix.OrthoOffCenterLH Method |
Language: |
Builds a customized, left-handed orthogonal projection matrix.
Visual Basic Public Shared Function OrthoOffCenterLH( _
ByVal left As Single, _
ByVal right As Single, _
ByVal bottom As Single, _
ByVal top As Single, _
ByVal znearPlane As Single, _
ByVal zfarPlane As Single _
) As MatrixC# public static Matrix OrthoOffCenterLH(
float left,
float right,
float bottom,
float top,
float znearPlane,
float zfarPlane
);C++ public:
static Matrix OrthoOffCenterLH(
float left,
float right,
float bottom,
float top,
float znearPlane,
float zfarPlane
);JScript public static function OrthoOffCenterLH(
left : float,
right : float,
bottom : float,
top : float,
znearPlane : float,
zfarPlane : float
) : Matrix;
left System.Single
Minimum x-value of the view volume.right System.Single
Maximum x-value of the view volume.bottom System.Single
Minimum y-value of the view volume.top System.Single
Maximum y-value of the view volume.znearPlane System.Single
Minimum z-value of the view volume.zfarPlane System.Single
Maximum z-value of the view volume.
Microsoft.DirectX.Matrix
A Matrix structure that is a customized, left-handed orthogonal projection matrix.
An orthogonal matrix is an invertible matrix for which the inverse is equal to the transpose.
The OrthoLH method is a special case of the OrthoOffCenterLH method. To create the same projection using OrthoOffCenterLH, use the following values: left = -width/2, right = width/2, bottom = -height/2, and top = height/2.
All of the parameters of the OrthoOffCenterLH method are distances in camera space. The parameters describe the dimensions of the view volume.
This method uses the following formula to compute the returned matrix.
2/(right-l) 0 0 0 0 2/(top-bottom) 0 0 0 0 1/(zfarPlane-znearPlane) 0 (l+right)/(l-right) (top+bottom)/(bottom-top) znearPlane/(znearPlane-zfarPlane) 1
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center