Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
XrRig.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <glm/glm.hpp>
6#include <glm/gtc/quaternion.hpp>
7
8#include <cstddef>
9
10namespace Engine::Rendering
11{
12 class Headset;
13}
14
15namespace Input
16{
21 {
25 bool isValid = false;
26
30 glm::vec3 position{ 0.0f };
31
35 glm::quat orientation{ 1.0f, 0.0f, 0.0f, 0.0f };
36 };
37
43 class XrRig
44 {
45 public:
46 XrRig( const XrInputHandler * inputHandler, const Engine::Rendering::Headset * headset );
47
49
50 [[nodiscard]] TrackedHandPose getHandPose( Hand hand ) const;
51
52 private:
53 const XrInputHandler * inputHandler_ = nullptr;
56 };
57} // namespace Input
Handles OpenXR input actions and controller state.
TrackedHandPose getHandPose(Hand hand) const
const XrInputHandler * inputHandler_
Definition XrRig.h:53
void resolveTrackedPoses()
TrackedHandPose handPoses_[2]
Definition XrRig.h:55
const Engine::Rendering::Headset * headset_
Definition XrRig.h:54
XrRig(const XrInputHandler *inputHandler, const Engine::Rendering::Headset *headset)
World-space pose for one tracked XR hand.
Definition XrRig.h:21
bool isValid
True when the pose was resolved from valid tracking data.
Definition XrRig.h:25
glm::quat orientation
World-space hand orientation.
Definition XrRig.h:35
glm::vec3 position
World-space hand position.
Definition XrRig.h:30