Camera.h 1012 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef DEF_CAMERA
  2. #define DEF_CAMERA
  3. // Includes GLM
  4. #include <glm/glm.hpp>
  5. #define GLM_ENABLE_EXPERIMENTAL
  6. #include <glm/gtx/transform.hpp>
  7. #include <glm/gtc/type_ptr.hpp>
  8. // Autres includes
  9. #include "Input.h"
  10. // Classe
  11. class Camera
  12. {
  13. public:
  14. Camera();
  15. Camera(glm::vec3 position, glm::vec3 pointCible, glm::vec3 axeVertical, float sensibilite, float vitesse);
  16. ~Camera();
  17. void orienter(int xRel, int yRel);
  18. void deplacer(Input const &input);
  19. void lookAt(glm::mat4 &modelview);
  20. void setPointcible(glm::vec3 pointCible);
  21. void setPosition(glm::vec3 position);
  22. float getSensibilite() const;
  23. float getVitesse() const;
  24. void setSensibilite(float sensibilite);
  25. void setVitesse(float vitesse);
  26. private:
  27. float m_phi;
  28. float m_theta;
  29. glm::vec3 m_orientation;
  30. glm::vec3 m_axeVertical;
  31. glm::vec3 m_deplacementLateral;
  32. glm::vec3 m_position;
  33. glm::vec3 m_pointCible;
  34. float m_sensibilite;
  35. float m_vitesse;
  36. };
  37. #endif