CInputManager.h
上传用户:jinmajixie
上传日期:2022-07-12
资源大小:435k
文件大小:1k
源码类别:

OpenGL

开发平台:

Visual C++

  1. #ifndef _CINPUTMANAGER_H_
  2. #define _CINPUTMANAGER_H_
  3. #include "main.h"
  4. /*******************************************************************************
  5. * INPUT MANAGER
  6. *******************************************************************************/
  7. class CInputManager
  8. {
  9. public:
  10. CInputManager();
  11. void Init(CTerrainEdit *te);
  12. // void Init(CSceneManager *s, CSystemStuff *sp);
  13. void AttachFloatToMouseX(float *something) { mcontrol_x = something; }
  14. void AttachFloatToMouseY(float *something) { mcontrol_y = something; }
  15. // CSceneManager *scene_m;
  16. // CSystemStuff *ssp;
  17. CTerrainEdit *tedit;
  18. CVector *rotation;
  19. CVector *position;
  20. CVector *lookat;
  21. CVector nullv;
  22. float *mcontrol_x;
  23. float *mcontrol_y;
  24. int action;
  25. bool mouse_initialized;
  26. bool rotate_camera;
  27. int mx, my;
  28.   bool mouse_active;
  29. bool filter;
  30. POINT current_pos;
  31. int window_center_x, window_center_y;
  32. int old_mouse_x, old_mouse_y;
  33. float sensitivity;
  34. float yaw;
  35. float pitch;
  36. void KeyDown(WPARAM k);
  37. void KeyUp(WPARAM k);
  38. void SetMousePointers(CVector *p, CVector *r, CVector *l);
  39. void MouseMove();
  40. void MovingObject();
  41. void CameraRotation();
  42. void FloatModify();
  43. void ProcessInput();
  44. bool keys[256];
  45. };
  46. #endif