?/TD> |
Microsoft DirectX 9.0 |
Builds a customized, right-handed perspective projection matrix.
Syntax
D3DXMATRIX *D3DXMatrixPerspectiveOffCenterRH(
D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf );
Parameters
- pOut
- [in, out] Pointer to the D3DXMATRIX structure that is the result of the operation.
- l
- [in] Minimum x-value of the view volume.
- r
- [in] Maximum x-value of the view volume.
- b
- [in] Minimum y-value of the view volume.
- t
- [in] Maximum y-value of the view volume.
- zn
- [in] Minimum z-value of the view volume.
- zf
- [in] Maximum z-value of the view volume.
Return Value
Pointer to a D3DXMATRIX structure that is a customized, right-handed perspective projection matrix.
Remarks
All the parameters of the D3DXMatrixPerspectiveOffCenterRH 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 D3DXMatrixPerspectiveOffCenterRH function can be used as a parameter for another function.
This function uses the following formula to compute the returned matrix.
2*zn/(r-l) 0 0 0 0 2*zn*(t-b) 0 0 (l+r)/(r-l) (t+b)/(t-b) zf/(zn-zf) -1 0 0 zn*zf/(zn-zf) 0
Function Information
Header d3dx9math.h Import library d3dx9.lib Minimum operating systems Windows 98
See Also
D3DXMatrixPerspectiveRH, D3DXMatrixPerspectiveLH, D3DXMatrixPerspectiveFovRH, D3DXMatrixPerspectiveFovLH, D3DXMatrixPerspectiveOffCenterLH