Microsoft DirectX 9.0 SDK Update (October 2004)

Matrix.PerspectiveLH Method

Language:

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

Builds a left-handed perspective projection matrix.

Definition

Visual Basic .NET Public Shared Function PerspectiveLH( _
    ByVal width As Single, _
    ByVal height As Single, _
    ByVal znearPlane As Single, _
    ByVal zfarPlane As Single _
) As Matrix
C# public static Matrix PerspectiveLH(
    float width,
    float height,
    float znearPlane,
    float zfarPlane
);
Managed C++ public: static Matrix PerspectiveLH(
    float width,
    float height,
    float znearPlane,
    float zfarPlane
);
JScript .NET public static function PerspectiveLH(
    width : float,
    height : float,
    znearPlane : float,
    zfarPlane : float
) : Matrix;

Parameters

width System.Single. Width of the view volume at the near view plane.
height System.Single. Height of the view volume at the near view plane.
znearPlane System.Single. Z-value of the near view plane.
zfarPlane System.Single. Z-value of the far view plane.

Return Value

Microsoft.DirectX.Matrix . A Matrix structure that is a left-handed perspective projection matrix.

Remarks

All of the parameters of the PerspectiveLH method are distances in camera space. The parameters describe the dimensions of the view volume.

2*znearPlane/width  0                    0                                            0
0                   2*znearPlane/height  0                                            0
0                   0                    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