Camera.h 994 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_CAMERA_H
  9. #define IGL_CAMERA_H
  10. #include "igl_inline.h"
  11. // Simple Camera class
  12. namespace igl
  13. {
  14. class Camera
  15. {
  16. // Public Fields
  17. public:
  18. // Rotation as quaternion (0,0,0,1) is identity
  19. double rotation[4];
  20. // Translation of origin
  21. double pan[3];
  22. // Zoom scale
  23. double zoom;
  24. // Perspective angle
  25. double angle;
  26. // Public functions
  27. public:
  28. Camera();
  29. // Copy constructor
  30. //
  31. // Inputs:
  32. // that other Camera to be copied
  33. Camera(const Camera & that);
  34. ~Camera(){}
  35. };
  36. };
  37. #ifdef IGL_HEADER_ONLY
  38. # include "Camera.cpp"
  39. #endif
  40. #endif