camera.h 785 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright 2013 Dario Manesku. All rights reserved.
  3. * License: http://www.opensource.org/licenses/BSD-2-Clause
  4. */
  5. static const uint8_t CAMERA_KEY_UP = 1u << 1;
  6. static const uint8_t CAMERA_KEY_DOWN = 1u << 2;
  7. static const uint8_t CAMERA_KEY_LEFT = 1u << 3;
  8. static const uint8_t CAMERA_KEY_RIGHT = 1u << 4;
  9. ///
  10. void cameraSetPosition(float* _pos);
  11. ///
  12. void cameraSetHorizontalAngle(float _horizontalAngle);
  13. ///
  14. void cameraSetVerticalAngle(float _verticalAngle);
  15. ///
  16. void cameraSetMouseState(uint32_t _mx, uint32_t _my, bool _down, bool _move);
  17. ///
  18. void cameraSetKeyState(uint8_t _key, bool _down);
  19. ///
  20. void cameraGetViewMtx(float* _viewMtx);
  21. ///
  22. void cameraGetPosition(float* _pos);
  23. ///
  24. void cameraGetAt(float* _at);
  25. ///
  26. void cameraUpdate(float _deltaTime = 0.0f);