Created
October 7, 2014 00:14
-
-
Save terryjsmith/2f4b58fc9df9d2ad08ec to your computer and use it in GitHub Desktop.
Evolution Camera class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Camera { | |
| public: | |
| Camera(); | |
| ~Camera(); | |
| public: | |
| // Change translation | |
| void SetTranslation(float x, float y, float z); | |
| void Move(float x, float y, float z); | |
| // Rotate the camera around the current up/right axes (in degrees) | |
| void SetLookAt(float x, float y, float z); | |
| void Rotate(float degrees, glm::vec3 axis); | |
| float* GetRotationMatrix(); | |
| public: | |
| glm::vec3 translation; | |
| glm::vec3 look; | |
| glm::vec3 up; | |
| glm::vec3 right; | |
| glm::quat rotation; | |
| float fnear, ffar; | |
| float fov; | |
| float aspect; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment