Microsoft DirectX 8.1 (C++) |
Builds a left-handed perspective projection matrix based on a field of view (FOV).
D3DXMATRIX* D3DXMatrixPerspectiveFovLH( D3DXMATRIX* pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf );
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 uses the following formula to compute the returned matrix.
h = cos(fov/2) / sin(fov/2); w = h / aspect; 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
Header: Declared in D3dx8math.h.
Import Library: Use D3dx8.lib.
D3DXMatrixPerspectiveRH, D3DXMatrixPerspectiveLH, D3DXMatrixPerspectiveFovRH, D3DXMatrixPerspectiveOffCenterRH, D3DXMatrixPerspectiveOffCenterLH