Add ray from controller

This commit is contained in:
Guillaume Meunier
2024-11-01 14:13:58 +01:00
parent e1ce484c27
commit d96f7f07a1
13 changed files with 535 additions and 25 deletions
+5 -2
View File
@@ -21,6 +21,7 @@
#include <filesystem>
#include <glm/glm.hpp>
#include <render/scene_data.h>
#include <span>
#include <variant>
#include <openxr/openxr.h>
@@ -59,9 +60,11 @@ struct input_profile
std::vector<visual_response> responses;
std::vector<std::pair<XrSpace, node_handle>> model_handles;
node_handle left_ray;
node_handle right_ray;
input_profile(const std::filesystem::path & json_profile, scene_loader & loader, scene_data & scene);
input_profile(const std::filesystem::path & json_profile, scene_loader & loader, scene_data & scene_controllers, scene_data & scene_rays);
// application::poll_actions() must have been called before
void apply(XrSpace world_space, XrTime predicted_display_time, bool hide_left, bool hide_right);
void apply(XrSpace world_space, XrTime predicted_display_time, bool hide_left, bool hide_right, std::span<glm::vec4> pointer_limits);
};