Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.6 KiB

  1. //-----------------------------------------------------------------------------
  2. // File: view.h
  3. //
  4. // Desc:
  5. //
  6. // Copyright (c) 1994-2000 Microsoft Corporation
  7. //-----------------------------------------------------------------------------
  8. #ifndef __view_h__
  9. #define __view_h__
  10. typedef struct
  11. {
  12. float viewAngle; // field of view angle for height
  13. float zNear; // near z clip value
  14. float zFar; // far z clip value
  15. } Perspective; // perspective view description
  16. //-----------------------------------------------------------------------------
  17. // Name:
  18. // Desc:
  19. //-----------------------------------------------------------------------------
  20. class VIEW
  21. {
  22. public:
  23. float m_zTrans; // z translation
  24. float m_yRot; // current yRotation
  25. float m_viewDist; // viewing distance, usually -zTrans
  26. int m_numDiv; // # grid divisions in x,y,z
  27. float m_divSize; // distance between divisions
  28. ISIZE m_winSize; // window size in pixels
  29. VIEW();
  30. BOOL SetWinSize( int width, int height );
  31. void CalcNodeArraySize( IPOINT3D *pNodeDim );
  32. void SetProjMatrix( IDirect3DDevice8* pd3dDevice );
  33. void IncrementSceneRotation();
  34. private:
  35. BOOL m_bProjMode; // projection mode
  36. Perspective m_persp; // perspective view description
  37. float m_aspectRatio; // x/y window aspect ratio
  38. D3DXVECTOR3 m_world; // view area in world space
  39. };
  40. #endif // __view_h__