Camera.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef DEF_CAMERA
  2. #define DEF_CAMERA
  3. ///Jovian
  4. ///Adaptation pour InputAndJoy
  5. ///Dernière modif : plaqué au sol (m_linear)
  6. // Includes GLM
  7. #include <glm/glm.hpp>
  8. #define GLM_ENABLE_EXPERIMENTAL
  9. #include <glm/gtx/transform.hpp>
  10. #include <glm/gtc/type_ptr.hpp>
  11. // Autres includes
  12. #include "Input.h"
  13. // Classe
  14. class Camera
  15. {
  16. public:
  17. Camera();
  18. Camera(glm::vec3 position, glm::vec3 pointCible, glm::vec3 axeVertical, float sensibilite, float vitesse);
  19. ~Camera();
  20. void orienter(float xRel, float yRel);
  21. void deplacer(Input const &input);
  22. void lookAt(glm::mat4 &modelview);
  23. void setPointcible(glm::vec3 pointCible);
  24. void setPosition(glm::vec3 position);
  25. float getSensibilite() const;
  26. float getVitesse() const;
  27. void setSensibilite(float sensibilite);
  28. void setVitesse(float vitesse);
  29. void setVol(bool activation);
  30. private:
  31. float m_phi;
  32. float m_theta;
  33. glm::vec3 m_orientation;
  34. glm::vec3 m_axeVertical;
  35. glm::vec3 m_deplacementLateral;
  36. glm::vec3 m_deplacementLineaire;
  37. glm::vec3 m_position;
  38. glm::vec3 m_pointCible;
  39. float m_sensibilite;
  40. float m_vitesse;
  41. bool m_vol;
  42. };
  43. #endif