void CalcMatrices(void) { D3DXMATRIXA16 ViewMatrix; // set the view matrix D3DXVECTOR3 EyePoint(g_Camera.Location.x, g_Camera.Location.y, g_Camera.Location.z); D3DXVECTOR3 LookAt(g_Camera.Location.x+cos(g_Camera.Rotation), g_Camera.Location.y, g_Camera.Location.z+sin(g_Camera.Rotation)); D3DXVECTOR3 UpVector(0.0f, 1.0f, 0.0f); D3DXMatrixLookAtLH(&ViewMatrix, &EyePoint, &LookAt, &UpVector); g_pDirect3D_Device->SetTransform(D3DTS_VIEW, &ViewMatrix); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)