mirror of
https://github.com/CrispyPin/sinpin-vr.git
synced 2024-09-20 14:46:19 +02:00
35 lines
600 B
C
35 lines
600 B
C
|
#include "util.h"
|
||
|
#include <GLFW/glfw3.h>
|
||
|
#include <string>
|
||
|
|
||
|
const vr::HmdMatrix34_t DEFAULT_POSE = {{{1, 0, 0, 0}, {0, 1, 0, 1}, {0, 0, 1, 0}}};
|
||
|
class App;
|
||
|
|
||
|
class Panel
|
||
|
{
|
||
|
public:
|
||
|
Panel(App *app, int index, int xmin, int xmax, int ymin, int ymax);
|
||
|
|
||
|
void Update();
|
||
|
|
||
|
private:
|
||
|
void Render();
|
||
|
void UpdateCursor();
|
||
|
void ControllerGrab(TrackerID);
|
||
|
void ControllerRelease();
|
||
|
|
||
|
App *_app;
|
||
|
OverlayID _id;
|
||
|
int _index;
|
||
|
std::string _name;
|
||
|
|
||
|
TrackerID _active_hand;
|
||
|
bool _is_held;
|
||
|
|
||
|
unsigned int _x, _y;
|
||
|
unsigned int _width, _height;
|
||
|
float _alpha;
|
||
|
|
||
|
vr::Texture_t _texture;
|
||
|
GLuint _gl_texture;
|
||
|
};
|