Microsoft DirectX 9.0 SDK Update (October 2004)

Matrix.PerspectiveOffCenterLH Method

Language:

Note: This documentation is preliminary and is subject to change.

Builds a customized, left-handed perspective projection matrix.

Definition

Visual Basic .NET Public Shared Function PerspectiveOffCenterLH( _
    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 PerspectiveOffCenterLH(
    float left,
    float right,
    float bottom,
    float top,
    float znearPlane,
    float zfarPlane
);
Managed C++ public: static Matrix PerspectiveOffCenterLH(
    float left,
    float right,
    float bottom,
    float top,
    float znearPlane,
    float zfarPlane
);
JScript .NET public static function PerspectiveOffCenterLH(
    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. 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.

Return Value

Microsoft.DirectX.Matrix . Pointer to a Matrix structure that is a customized, left-handed perspective projection matrix.

Remarks

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

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center