camera.h 744 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright 2013 Dario Manesku. All rights reserved.
  3. * License: http://www.opensource.org/licenses/BSD-2-Clause
  4. */
  5. #define CAMERA_KEY_UP UINT8_C(0x1)
  6. #define CAMERA_KEY_DOWN UINT8_C(0x2)
  7. #define CAMERA_KEY_LEFT UINT8_C(0x4)
  8. #define CAMERA_KEY_RIGHT UINT8_C(0x8)
  9. ///
  10. void cameraCreate();
  11. ///
  12. void cameraDestroy();
  13. ///
  14. void cameraSetPosition(float* _pos);
  15. ///
  16. void cameraSetHorizontalAngle(float _horizontalAngle);
  17. ///
  18. void cameraSetVerticalAngle(float _verticalAngle);
  19. ///
  20. void cameraSetKeyState(uint8_t _key, bool _down);
  21. ///
  22. void cameraGetViewMtx(float* _viewMtx);
  23. ///
  24. void cameraGetPosition(float* _pos);
  25. ///
  26. void cameraGetAt(float* _at);
  27. ///
  28. void cameraUpdate(float _deltaTime, uint32_t _mx, uint32_t _my, bool _move);