Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Input::XrInputHandler Class Reference

#include <XrInputHandler.h>

Collaboration diagram for Input::XrInputHandler:

Public Member Functions

 XrInputHandler (const EngineCore::Headset *headset, const EngineCore::ApplicationContext *context)
void syncInputs (XrSpace playerSpace, XrTime predictedDisplayTime)
XrSpace getLeftHandSpace ()
XrSpace getRightHandSpace ()
HandPoseInfo getHandPoseInfo (Hand hand) const
glm::vec2 getRightThumbstick () const
 Gets the right thumbstick input for XZ plane movement.
glm::vec2 getLeftThumbstick () const
 Gets the left thumbstick input.
float getTriggerValue (Hand hand) const
 Gets the trigger value for the specified hand (0.0 to 1.0)
float getGripValue (Hand hand) const
 Gets the grip/squeeze value for the specified hand (0.0 to 1.0)

Public Attributes

std::vector< HandPoseInfohandPoseInfos

Private Attributes

XrActionSet defaultActionSet = XR_NULL_HANDLE
std::vector< XrPath > handPaths
XrAction aimPoseAction = XR_NULL_HANDLE
XrAction aimPoseLeftHand = XR_NULL_HANDLE
XrAction thumbstickAction_ = XR_NULL_HANDLE
XrAction triggerAction_ = XR_NULL_HANDLE
XrAction gripAction_ = XR_NULL_HANDLE
glm::vec2 rightThumbstick_ {0.0f}
glm::vec2 leftThumbstick_ {0.0f}
float triggerValues_ [2] = {0.0f, 0.0f}
float gripValues_ [2] = {0.0f, 0.0f}
EngineCore::Engineengine = nullptr
const EngineCore::Headsetheadset = nullptr
const EngineCore::ApplicationContextcontext = nullptr

Detailed Description

Definition at line 131 of file XrInputHandler.h.

Constructor & Destructor Documentation

◆ XrInputHandler()

Input::XrInputHandler::XrInputHandler ( const EngineCore::Headset * headset,
const EngineCore::ApplicationContext * context )

Member Function Documentation

◆ getGripValue()

float Input::XrInputHandler::getGripValue ( Hand hand) const
nodiscard

Gets the grip/squeeze value for the specified hand (0.0 to 1.0)

Definition at line 333 of file XrInputHandler.cpp.

References gripValues_.

◆ getHandPoseInfo()

Input::HandPoseInfo Input::XrInputHandler::getHandPoseInfo ( Hand hand) const

Definition at line 323 of file XrInputHandler.cpp.

References handPoseInfos.

Referenced by getLeftHandSpace(), and getRightHandSpace().

Here is the caller graph for this function:

◆ getLeftHandSpace()

XrSpace Input::XrInputHandler::getLeftHandSpace ( )

Definition at line 313 of file XrInputHandler.cpp.

References getHandPoseInfo(), Input::LEFT, and Input::HandPoseInfo::space.

Here is the call graph for this function:

◆ getLeftThumbstick()

glm::vec2 Input::XrInputHandler::getLeftThumbstick ( ) const
inlinenodiscard

Gets the left thumbstick input.

Returns
vec2 where x = left/right, y = forward/back

Definition at line 152 of file XrInputHandler.h.

References leftThumbstick_.

◆ getRightHandSpace()

XrSpace Input::XrInputHandler::getRightHandSpace ( )

Definition at line 318 of file XrInputHandler.cpp.

References getHandPoseInfo(), Input::RIGHT, and Input::HandPoseInfo::space.

Here is the call graph for this function:

◆ getRightThumbstick()

glm::vec2 Input::XrInputHandler::getRightThumbstick ( ) const
inlinenodiscard

Gets the right thumbstick input for XZ plane movement.

Returns
vec2 where x = strafe (left/right), y = forward/back

Definition at line 146 of file XrInputHandler.h.

References rightThumbstick_.

◆ getTriggerValue()

float Input::XrInputHandler::getTriggerValue ( Hand hand) const
nodiscard

Gets the trigger value for the specified hand (0.0 to 1.0)

Definition at line 328 of file XrInputHandler.cpp.

References triggerValues_.

◆ syncInputs()

void Input::XrInputHandler::syncInputs ( XrSpace playerSpace,
XrTime predictedDisplayTime )

Member Data Documentation

◆ aimPoseAction

XrAction Input::XrInputHandler::aimPoseAction = XR_NULL_HANDLE
private

Definition at line 170 of file XrInputHandler.h.

Referenced by syncInputs(), and XrInputHandler().

◆ aimPoseLeftHand

XrAction Input::XrInputHandler::aimPoseLeftHand = XR_NULL_HANDLE
private

Definition at line 171 of file XrInputHandler.h.

◆ context

const EngineCore::ApplicationContext* Input::XrInputHandler::context = nullptr
private

Definition at line 189 of file XrInputHandler.h.

Referenced by XrInputHandler().

◆ defaultActionSet

XrActionSet Input::XrInputHandler::defaultActionSet = XR_NULL_HANDLE
private

Definition at line 167 of file XrInputHandler.h.

Referenced by syncInputs(), and XrInputHandler().

◆ engine

EngineCore::Engine* Input::XrInputHandler::engine = nullptr
private

Definition at line 186 of file XrInputHandler.h.

Referenced by XrInputHandler().

◆ gripAction_

XrAction Input::XrInputHandler::gripAction_ = XR_NULL_HANDLE
private

Definition at line 178 of file XrInputHandler.h.

Referenced by syncInputs(), and XrInputHandler().

◆ gripValues_

float Input::XrInputHandler::gripValues_[2] = {0.0f, 0.0f}
private

Definition at line 184 of file XrInputHandler.h.

Referenced by getGripValue(), and syncInputs().

◆ handPaths

std::vector<XrPath> Input::XrInputHandler::handPaths
private

Definition at line 168 of file XrInputHandler.h.

Referenced by XrInputHandler().

◆ handPoseInfos

std::vector<HandPoseInfo> Input::XrInputHandler::handPoseInfos

Definition at line 164 of file XrInputHandler.h.

Referenced by getHandPoseInfo(), syncInputs(), and XrInputHandler().

◆ headset

const EngineCore::Headset* Input::XrInputHandler::headset = nullptr
private

Definition at line 188 of file XrInputHandler.h.

Referenced by syncInputs(), and XrInputHandler().

◆ leftThumbstick_

glm::vec2 Input::XrInputHandler::leftThumbstick_ {0.0f}
private

Definition at line 182 of file XrInputHandler.h.

Referenced by getLeftThumbstick(), and syncInputs().

◆ rightThumbstick_

glm::vec2 Input::XrInputHandler::rightThumbstick_ {0.0f}
private

Definition at line 181 of file XrInputHandler.h.

Referenced by getRightThumbstick(), and syncInputs().

◆ thumbstickAction_

XrAction Input::XrInputHandler::thumbstickAction_ = XR_NULL_HANDLE
private

Definition at line 174 of file XrInputHandler.h.

Referenced by syncInputs(), and XrInputHandler().

◆ triggerAction_

XrAction Input::XrInputHandler::triggerAction_ = XR_NULL_HANDLE
private

Definition at line 177 of file XrInputHandler.h.

Referenced by syncInputs(), and XrInputHandler().

◆ triggerValues_

float Input::XrInputHandler::triggerValues_[2] = {0.0f, 0.0f}
private

Definition at line 183 of file XrInputHandler.h.

Referenced by getTriggerValue(), and syncInputs().


The documentation for this class was generated from the following files: