Source code of Windows XP (NT5)
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.

43 lines
1.4 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: view.h
  3. *
  4. * Node stuff
  5. *
  6. * Copyright (c) 1995 Microsoft Corporation
  7. *
  8. \**************************************************************************/
  9. #ifndef __view_h__
  10. #define __view_h__
  11. #include "sscommon.h"
  12. typedef struct {
  13. float viewAngle; // field of view angle for height
  14. float zNear; // near z clip value
  15. float zFar; // far z clip value
  16. } Perspective; // perspective view description
  17. class VIEW {
  18. public:
  19. float zTrans; // z translation
  20. float yRot; // current yRotation
  21. float viewDist; // viewing distance, usually -zTrans
  22. int numDiv; // # grid divisions in x,y,z
  23. float divSize; // distance between divisions
  24. ISIZE winSize; // window size in pixels
  25. VIEW();
  26. BOOL SetWinSize( int width, int height );
  27. void SetGLView();
  28. void CalcNodeArraySize( IPOINT3D *pNodeDim );
  29. void SetProjMatrix();
  30. void IncrementSceneRotation();
  31. private:
  32. BOOL bProjMode; // projection mode
  33. Perspective persp; // perspective view description
  34. float aspectRatio; // x/y window aspect ratio
  35. POINT3D world; // view area in world space
  36. };
  37. #endif // __view_h__