Add hand tracking

This commit is contained in:
Guillaume Meunier
2024-02-25 16:09:32 +01:00
parent 91f6dc08f0
commit a2271d486a
23 changed files with 615 additions and 93 deletions
+20
View File
@@ -19,6 +19,7 @@
#pragma once
#include "xr/hand_tracker.h"
#ifdef __ANDROID__
#include <android_native_app_glue.h>
#endif
@@ -118,6 +119,10 @@ class application : public singleton<application>
xr::space right_grip_space;
xr::space right_aim_space;
bool hand_tracking_supported = false;
xr::hand_tracker left_hand;
xr::hand_tracker right_hand;
bool session_running = false;
bool session_focused = false;
bool session_visible = false;
@@ -379,4 +384,19 @@ public:
{
return instance().last_scene_gpu_time;
}
static bool get_hand_tracking_supported()
{
return instance().hand_tracking_supported;
}
static xr::hand_tracker& get_left_hand()
{
return instance().left_hand;
}
static xr::hand_tracker& get_right_hand()
{
return instance().right_hand;
}
};