码迷,mamicode.com
首页 > 其他好文 > 详细

D3DXMatrixPerspectiveFovLH,D3DXMatrixIdentity,D3DXMatrixOrthoLH

时间:2014-11-04 00:12:31      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:d3d11

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 );

D3DXMatrixPerspectiveFovLH,D3DXMatrixIdentity,D3DXMatrixOrthoLH

标签:d3d11

原文地址:http://blog.csdn.net/a809146548/article/details/40753687

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!