2
0

camera.h 991 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2013 Dario Manesku. All rights reserved.
  3. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
  4. */
  5. #ifndef CAMERA_H_HEADER_GUARD
  6. #define CAMERA_H_HEADER_GUARD
  7. #include "entry/entry.h"
  8. #define CAMERA_KEY_FORWARD UINT8_C(0x01)
  9. #define CAMERA_KEY_BACKWARD UINT8_C(0x02)
  10. #define CAMERA_KEY_LEFT UINT8_C(0x04)
  11. #define CAMERA_KEY_RIGHT UINT8_C(0x08)
  12. #define CAMERA_KEY_UP UINT8_C(0x10)
  13. #define CAMERA_KEY_DOWN UINT8_C(0x20)
  14. ///
  15. void cameraCreate();
  16. ///
  17. void cameraDestroy();
  18. ///
  19. void cameraSetPosition(const bx::Vec3& _pos);
  20. ///
  21. void cameraSetHorizontalAngle(float _horizontalAngle);
  22. ///
  23. void cameraSetVerticalAngle(float _verticalAngle);
  24. ///
  25. void cameraSetKeyState(uint8_t _key, bool _down);
  26. ///
  27. void cameraGetViewMtx(float* _viewMtx);
  28. ///
  29. bx::Vec3 cameraGetPosition();
  30. ///
  31. bx::Vec3 cameraGetAt();
  32. ///
  33. void cameraUpdate(float _deltaTime, const entry::MouseState& _mouseState, bool _reset = false);
  34. #endif // CAMERA_H_HEADER_GUARD