mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-20 09:01:39 -08:00
53 lines
1.7 KiB
C++
53 lines
1.7 KiB
C++
/*
|
|
* WiVRn VR streaming
|
|
* Copyright (C) 2024 Guillaume Meunier <[email protected]>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "scene.h"
|
|
#include <cstdint>
|
|
#include <entt/fwd.hpp>
|
|
#include <filesystem>
|
|
#include <glm/glm.hpp>
|
|
#include <magic_enum_containers.hpp>
|
|
#include <span>
|
|
#include <xr/space.h>
|
|
#include <openxr/openxr.h>
|
|
|
|
struct input_profile
|
|
{
|
|
std::string id;
|
|
|
|
entt::entity left_ray;
|
|
entt::entity right_ray;
|
|
|
|
magic_enum::containers::array<xr::spaces, std::pair<glm::vec3, glm::quat>> offset;
|
|
|
|
input_profile(scene & scene, const std::filesystem::path & json_profile, uint32_t layer_mask_controller, uint32_t layer_mask_ray, XrAction left_trigger = XR_NULL_HANDLE, XrAction right_trigger = XR_NULL_HANDLE);
|
|
|
|
// application::poll_actions() must have been called before
|
|
void apply(
|
|
entt::registry & scene,
|
|
XrSpace world_space,
|
|
XrTime predicted_display_time,
|
|
bool hide_left_controller,
|
|
bool hide_left_ray,
|
|
bool hide_right_controller,
|
|
bool hide_right_ray,
|
|
std::span<glm::mat4> world_to_window);
|
|
};
|