Open Source Tomb Raider Engine
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.

Camera.h 894B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*!
  2. * \file include/Camera.h
  3. * \brief Camera class
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _CAMERA_H_
  8. #define _CAMERA_H_
  9. #include "glm/vec3.hpp"
  10. #include "glm/mat4x4.hpp"
  11. class Camera {
  12. public:
  13. static void handleMouseMotion(int x, int y);
  14. static glm::mat4 getViewMatrix();
  15. static float getRadianPitch() { return thetaX; }
  16. static float getRadianYaw() { return thetaY; }
  17. static void setPosition(glm::vec3 p) { pos = p; }
  18. static glm::vec3 getPosition() { return pos; }
  19. static void setSensitivityX(float sens) { rotationDeltaX = sens; }
  20. static float getSensitivityX() { return rotationDeltaX; }
  21. static void setSensitivityY(float sens) { rotationDeltaY = sens; }
  22. static float getSensitivityY() { return rotationDeltaY; }
  23. private:
  24. static glm::vec3 pos;
  25. static float thetaX, thetaY;
  26. static float rotationDeltaX, rotationDeltaY;
  27. };
  28. #endif