Exemple #1
0
 Matrix Matrix::CreatePerspective(float width, float height, float zn, float zf)
 {
     D3DXMATRIX mat;                 
     D3DXMatrixPerspectiveRH(&mat,width,height,zn,zf);
     return Matrix( (float*)&mat._11);
 }
Exemple #2
0
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);
}