Builds a left-handed perspective projection matrix based on a field of view.
D3DXMATRIX * D3DXMatrixPerspectiveFovLH(
[in, out] Pointer to the D3DXMATRIX structure that is the result of the operation.
[in] Field of view in the y direction, in radians.
[in] Aspect ratio, defined as view space width divided by height.
[in] Z-value of the near view-plane.
[in] Z-value of the far view-plane.
Pointer to a D3DXMATRIX structure that is a left-handed perspective projection matrix.
The return value for this function is the same value returned in the pOut parameter. In this way, the D3DXMatrixPerspectiveFovLH function can be used as a parameter for another function.
This function computes the returned matrix as shown:
xScale 0 0 0
0 yScale 0 0
0 0 zf/(zf-zn) 1
0 0 -zn*zf/(zf-zn) 0
yScale = cot(fovY/2)
xScale = yScale / aspect ratio
Header: Declared in D3DX10Math.h.