2017-02-22 directx中第五卷 包围盒定义包围盒struct BoundBox{ BoundBox(); bool isPointInside(D3DXVECTOR3& p); //是否包含点 D3DXVECTOR3 _min; D3DXVECTOR3 _max;};BoundBox::BoundBox(){ _min.x = -Infinity; _min.y = -Infinity; _min.z = -Infinity; _max.x = Infinity; _max.y = Infinity; _max.z = Infinity;}bool BoundBox::isPointInside(D3DXVECTOR3& p){ if (p.x >= _min.x && p.y >= _min.y && p.z >= _min.z && p.x <= _max.x && p.y <= _max.y && p.z <= _max.z) { return true; } else { return false; }} 中级directx总结 directx more >>
2017-02-19 directx中第三卷 Model声明变量ID3DXMesh* mesh = 0;vector<D3DMATERIAL9> Mtrls(0);vector<IDirect3DTexture9*> Textures(0);DWORD numMtrl = 0; 中级directx总结 directx more >>
2017-02-11 directx初第十二卷 模版声明变量ID3DXMesh* Teapot = 0;ID3DXMesh* Mirror = 0; 初级directx总结 directx more >>
2017-02-10 directx初第十卷 混合alpha混合//开启alpha混合g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, true);//设置融合因子g_pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);g_pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);//(设置融合方式,像素相加)默认为相加,可以不写此句g_pd3dDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD); 初级directx总结 directx more >>