Microsoft DirectX 8.1 (C++) |
Builds a right-handed orthogonal projection matrix.
D3DXMATRIX* D3DXMatrixOrthoRH( D3DXMATRIX* pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf );
Pointer to a D3DXMATRIX structure that is a right-handed orthogonal projection matrix.
An orthogonal matrix is an invertible matrix for which the inverse of the matrix is equal to the transpose of the matrix.
All the parameters of the D3DXMatrixOrthoRH 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 D3DXMatrixOrthoRH function can be used as a parameter for another function.
This function uses the following formula to compute the returned matrix.
2/w 0 0 0 0 2/h 0 0 0 0 1/(zn-zf) 0 0 0 zn/(zn-zf) 1
Header: Declared in D3dx8math.h.
Import Library: Use D3dx8.lib.
D3DXMatrixOrthoLH, D3DXMatrixOrthoOffCenterRH, D3DXMatrixOrthoOffCenterLH