Camera.h 968 B

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