?/TD>
Microsoft DirectX 9.0

D3DXMatrixOrthoLH Function


Builds a left-handed orthogonal projection matrix.

Syntax

D3DXMATRIX *D3DXMatrixOrthoLH(      

    D3DXMATRIX *pOut,     FLOAT w,     FLOAT h,     FLOAT zn,     FLOAT zf );

Parameters

pOut
[in, out] Pointer to the D3DXMATRIX structure that contains the resulting matrix.
w
[in] Width of the view volume.
h
[in] Height of the view volume.
zn
[in] Minimum z-value of the view volume which is referred to as z-near.
zf
[in] Maximum z-value of the view volume which is referred to as z-far.

Return Value

Pointer to a D3DXMATRIX structure that is a left-handed orthogonal projection matrix.



Remarks

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

All the parameters of the D3DXMatrixOrthoLH function are distances in camera space. The parameters describe the dimensions of the view volume.

The return value for this function is the same value returned in the pOut parameter. In this way, the D3DXMatrixOrthoLH function can be used as a parameter for another function.

This function uses the following formula to compute the returned matrix.

2/w  0    0           0
0    2/h  0           0
0    0    1/(zf-zn)   0
0    0    zn/(zn-zf)  1

Function Information

Headerd3dx9math.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98

See Also

D3DXMatrixOrthoRH, D3DXMatrixOrthoOffCenterRH, D3DXMatrixOrthoOffCenterLH


© 2002 Microsoft Corporation. All rights reserved.