[C++] The IN55 project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
702B

  1. #ifndef __CAMERA_H__
  2. #define __CAMERA_H__
  3. #include <iostream>
  4. #include <GL/gl.h>
  5. #include <assimp/cimport.h>
  6. #include <assimp/scene.h>
  7. #include <assimp/postprocess.h>
  8. #include <vectors.h>
  9. /* Camera class */
  10. class Camera
  11. {
  12. private:
  13. Vec3 eyePos;
  14. Vec3 centerPos;
  15. Vec3 upVector;
  16. public:
  17. /* Camera constructor */
  18. Camera();
  19. /* Update the camera to look at the correct position with correct orientation */
  20. void updateCamera();
  21. /* Compute the current up vector */
  22. void calculateUp();
  23. void setPos(Vec3 newPos);
  24. void setOrient(Vec3 newOrient);
  25. Vec3 getPos();
  26. Vec3 getOrient();
  27. };
  28. #endif