Camera.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. void setSensibilite(float sensibilite);
  26. void setVitesse(float vitesse);
  27. void setVol(bool activation);
  28. float getSensibilite() const;
  29. float getVitesse() const;
  30. glm::vec3 getPos() const;
  31. glm::vec3 getDirect() const;
  32. float getTheta() const;
  33. float getPhi() const;
  34. glm::vec3 getNormale() const;
  35. private:
  36. float m_phi;
  37. float m_theta;
  38. glm::vec3 m_orientation;
  39. glm::vec3 m_axeVertical;
  40. glm::vec3 m_deplacementLateral;
  41. glm::vec3 m_deplacementLineaire;
  42. glm::vec3 m_position;
  43. glm::vec3 m_pointCible;
  44. float m_sensibilite;
  45. float m_vitesse;
  46. bool m_vol;
  47. };
  48. #endif