Export (0) Print
Expand All
Expand Minimize
1 out of 2 rated this helpful - Rate this topic

D3DXMatrixPerspectiveLH function

Builds a left-handed perspective projection matrix

Syntax


D3DXMATRIX* D3DXMatrixPerspectiveLH(
  _Inout_  D3DXMATRIX *pOut,
  _In_     FLOAT w,
  _In_     FLOAT h,
  _In_     FLOAT zn,
  _In_     FLOAT zf
);

Parameters

pOut [in, out]

Type: D3DXMATRIX*

Pointer to the D3DXMATRIX structure that is the result of the operation.

w [in]

Type: FLOAT

Width of the view volume at the near view-plane.

h [in]

Type: FLOAT

Height of the view volume at the near view-plane.

zn [in]

Type: FLOAT

Z-value of the near view-plane.

zf [in]

Type: FLOAT

Z-value of the far view-plane.

Return value

Type: D3DXMATRIX*

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

Remarks

All the parameters of the D3DXMatrixPerspectiveLH 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 D3DXMatrixPerspectiveLH function can be used as a parameter for another function.

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



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

Requirements

Header

D3dx9math.h

Library

D3dx9.lib

See also

D3DXMatrixPerspectiveRH
D3DXMatrixPerspectiveFovRH
D3DXMatrixPerspectiveFovLH
D3DXMatrixPerspectiveOffCenterRH
D3DXMatrixPerspectiveOffCenterLH

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.