CMouseInput.h 681 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. #include <glm/vec2.hpp>
  3. #include "GLFW/glfw3.h"
  4. namespace WallpaperEngine::Input
  5. {
  6. /**
  7. * Handles mouse input for the background
  8. */
  9. class CMouseInput
  10. {
  11. public:
  12. explicit CMouseInput(GLFWwindow* window);
  13. /**
  14. * Takes current mouse position and updates it
  15. */
  16. void update ();
  17. /**
  18. * The virtual pointer's position
  19. */
  20. glm::dvec2 position;
  21. private:
  22. /**
  23. * The GLFW window to get mouse position from
  24. */
  25. GLFWwindow* m_window;
  26. /**
  27. * The current mouse position
  28. */
  29. glm::dvec2 m_mousePosition;
  30. };
  31. }