Matrix Matrix::CreatePerspective(float width, float height, float zn, float zf) { D3DXMATRIX mat; D3DXMatrixPerspectiveRH(&mat,width,height,zn,zf); return Matrix( (float*)&mat._11); }
void xForm::SetPerspectiveByWidthZ(float width, float height, float zNear, float zFar) { D3DXMATRIX mat; D3DXMatrixPerspectiveRH(&mat, width, height, zNear, zFar); m_pd3dDevice->SetTransform(D3DTS_PROJECTION, &mat); }