Export (0) Print
Expand All

Matrix.OrthoOffCenterRH(Single,Single,Single,Single,Single,Single) Method (Microsoft.DirectX)

Builds a customized, right-handed orthogonal projection matrix.

Definition

Visual BasicPublic Shared Function OrthoOffCenterRH( _
    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 Matrix
C#public static Matrix OrthoOffCenterRH(
    float left,
    float right,
    float bottom,
    float top,
    float znearPlane,
    float zfarPlane
);
C++public:
static Matrix OrthoOffCenterRH(
    float left,
    float right,
    float bottom,
    float top,
    float znearPlane,
    float zfarPlane
);
JScriptpublic static function OrthoOffCenterRH(
    left : float,
    right : float,
    bottom : float,
    top : float,
    znearPlane : float,
    zfarPlane : float
) : Matrix;

Parameters

left System.Single
Minimum x-value of the view volume.
right System.Single
Maximum x-value of the view volume.
bottom System.Single
Maximum y-value of the view volume.
top System.Single
Minimum 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.

Return Value

Microsoft.DirectX.Matrix
A Matrix structure that is a customized, right-handed orthogonal projection matrix.

Remarks

An orthogonal matrix is an invertible matrix for which the inverse is equal to the transpose.

The OrthoRH method is a special case of the OrthoOffCenterRH method. To create the same projection using OrthoOffCenterRH, use the following values: left = -width/2, right = width/2, bottom = -height/2, and top = height/2.

All of the parameters of the OrthoOffCenterRH 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-left)         0                         0                                  0
0                      2/(top-bottom)            0                                  0
0                      0                         1/(znearPlane-zfarPlane)           0
(l+right)/(l-rright)  (top+bottom)/(bottom-top)  znearPlane/(znearPlane-zfarPlane)  1

See Also

Show:
© 2014 Microsoft