?/TD> |
Microsoft DirectX 9.0 |
Builds a right-handed perspective projection matrix based on a field of view.
Syntax
D3DXMATRIX *D3DXMatrixPerspectiveFovRH(
D3DXMATRIX *pOut, FLOAT fovY, FLOAT Aspect, FLOAT zn, FLOAT zf );
Parameters
- pOut
- [in, out] Pointer to the D3DXMATRIX structure that is the result of the operation.
- fovY
- [in] Field of view, in the y direction, in radians.
- Aspect
- [in] Aspect ratio, defined as view space height divided by width.
- zn
- [in] Z-value of the near view-plane.
- zf
- [in] Z-value of the far view-plane.
Return Value
Pointer to a D3DXMATRIX structure that is a right-handed perspective projection matrix.
Remarks
The return value for this function is the same value returned in the pOut parameter. In this way, the D3DXMatrixPerspectiveFovRH function can be used as a parameter for another function.
This function computes the returned matrix as shown.
w 0 0 0 0 h 0 0 0 0 zf/(zn-zf) -1 0 0 zn*zf/(zn-zf) 0 where: h is the view space height. It is calculated from h = cot(fovY/2); w is the view space width. It is calculated from w = h / Aspect.
Function Information
Header d3dx9math.h Import library d3dx9.lib Minimum operating systems Windows 98
See Also
D3DXMatrixPerspectiveRH, D3DXMatrixPerspectiveLH, D3DXMatrixPerspectiveFovLH, D3DXMatrixPerspectiveOffCenterRH, D3DXMatrixPerspectiveOffCenterLH