bgfx/examples/common/camera.h

49 lines
971 B
C
Raw Normal View History

2014-04-17 06:51:25 +04:00
/*
* Copyright 2013 Dario Manesku. All rights reserved.
2016-01-01 11:11:04 +03:00
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
2014-04-17 06:51:25 +04:00
*/
2014-12-16 07:59:22 +03:00
#ifndef CAMERA_H_HEADER_GUARD
#define CAMERA_H_HEADER_GUARD
#include "entry/entry.h"
#define CAMERA_KEY_FORWARD UINT8_C(0x01)
#define CAMERA_KEY_BACKWARD UINT8_C(0x02)
#define CAMERA_KEY_LEFT UINT8_C(0x04)
#define CAMERA_KEY_RIGHT UINT8_C(0x08)
#define CAMERA_KEY_UP UINT8_C(0x10)
#define CAMERA_KEY_DOWN UINT8_C(0x20)
2014-04-17 06:51:25 +04:00
///
void cameraCreate();
///
void cameraDestroy();
///
2018-12-22 08:05:26 +03:00
void cameraSetPosition(const bx::Vec3& _pos);
2014-04-17 06:51:25 +04:00
///
void cameraSetHorizontalAngle(float _horizontalAngle);
///
void cameraSetVerticalAngle(float _verticalAngle);
///
void cameraSetKeyState(uint8_t _key, bool _down);
///
void cameraGetViewMtx(float* _viewMtx);
///
2018-12-22 08:05:26 +03:00
bx::Vec3 cameraGetPosition();
2014-04-17 06:51:25 +04:00
///
2018-12-22 08:05:26 +03:00
bx::Vec3 cameraGetAt();
2014-04-17 06:51:25 +04:00
///
2014-12-16 07:59:22 +03:00
void cameraUpdate(float _deltaTime, const entry::MouseState& _mouseState);
#endif // CAMERA_H_HEADER_GUARD