D3DXMatrixPerspectiveFovLH,D3DXMatrixIdentity,D3DXMatrixOrthoLH

来源:互联网 发布:在淘宝网上买车可靠吗 编辑:程序博客网 时间:2024/05/22 14:35
1、#define D3DX_PI    (3.14159265358979323846)
#define D3DX_1BYPI ( 1.0 / D3DX_PI )
#define D3DXToRadian( degree ) ((degree) * (D3DX_PI / 180.0))

#define D3DXToDegree( radian ) ((radian) * (180.0 / D3DX_PI))


2、D3DXMatrixPerspectiveFovLH

D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovLH
    ( D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf );

3、D3DXMatrixIdentity

D3DX10INLINE D3DXMATRIX* D3DXMatrixIdentity
    ( D3DXMATRIX *pOut )
{
#ifdef D3DX10_DEBUG
    if(!pOut)
        return NULL;
#endif

    pOut->m[0][1] = pOut->m[0][2] = pOut->m[0][3] =
    pOut->m[1][0] = pOut->m[1][2] = pOut->m[1][3] =
    pOut->m[2][0] = pOut->m[2][1] = pOut->m[2][3] =
    pOut->m[3][0] = pOut->m[3][1] = pOut->m[3][2] = 0.0f;

    pOut->m[0][0] = pOut->m[1][1] = pOut->m[2][2] = pOut->m[3][3] = 1.0f;
    return pOut;
}

#define D3DX10INLINE __forceinline


4、D3DXMatrixOrthoLH

D3DXMATRIX* WINAPI D3DXMatrixOrthoLH
    ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf );

0 0
原创粉丝点击