12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #ifndef DEF_CAMERA
- #define DEF_CAMERA
- ///Jovian
- ///Adaptation pour InputAndJoy
- ///Dernière modif : plaqué au sol (m_linear)
- // Includes GLM
- #include <glm/glm.hpp>
- #define GLM_ENABLE_EXPERIMENTAL
- #include <glm/gtx/transform.hpp>
- #include <glm/gtc/type_ptr.hpp>
- // Autres includes
- #include "Input.h"
- // Classe
- class Camera
- {
- public:
- Camera();
- Camera(glm::vec3 position, glm::vec3 pointCible, glm::vec3 axeVertical, float sensibilite, float vitesse);
- ~Camera();
- void orienter(float xRel, float yRel);
- void deplacer(Input const &input);
- void lookAt(glm::mat4 &modelview);
- void setPointcible(glm::vec3 pointCible);
- void setPosition(glm::vec3 position);
- void setSensibilite(float sensibilite);
- void setVitesse(float vitesse);
- void setVol(bool activation);
- float getSensibilite() const;
- float getVitesse() const;
- glm::vec3 getPos() const;
- glm::vec3 getDirect() const;
- float getTheta() const;
- float getPhi() const;
- glm::vec3 getNormale() const;
- private:
- float m_phi;
- float m_theta;
- glm::vec3 m_orientation;
- glm::vec3 m_axeVertical;
- glm::vec3 m_deplacementLateral;
- glm::vec3 m_deplacementLineaire;
- glm::vec3 m_position;
- glm::vec3 m_pointCible;
- float m_sensibilite;
- float m_vitesse;
- bool m_vol;
- };
- #endif
|