|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
#include <XrInputHandler.h>
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< HandPoseInfo > | handPoseInfos |
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::Engine * | engine = nullptr |
| const EngineCore::Headset * | headset = nullptr |
| const EngineCore::ApplicationContext * | context = nullptr |
Definition at line 131 of file XrInputHandler.h.
| Input::XrInputHandler::XrInputHandler | ( | const EngineCore::Headset * | headset, |
| const EngineCore::ApplicationContext * | context ) |
Definition at line 77 of file XrInputHandler.cpp.
References Input::ActionProfileOculusTouchController::actionProfile, Input::ActionProfileSimpleController::actionProfile, aimPoseAction, context, defaultActionSet, engine, EngineCore::EngineManager::getEngineModule(), EngineCore::EngineManager::getInstance(), gripAction_, handPaths, handPoseInfos, headset, Input::LEFT, Input::RIGHT, thumbstickAction_, TRACY_ZONE_SCOPED_FUNCTION, and triggerAction_.
|
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_.
| Input::HandPoseInfo Input::XrInputHandler::getHandPoseInfo | ( | Hand | hand | ) | const |
Definition at line 323 of file XrInputHandler.cpp.
References handPoseInfos.
Referenced by getLeftHandSpace(), and getRightHandSpace().
| XrSpace Input::XrInputHandler::getLeftHandSpace | ( | ) |
Definition at line 313 of file XrInputHandler.cpp.
References getHandPoseInfo(), Input::LEFT, and Input::HandPoseInfo::space.
|
inlinenodiscard |
Gets the left thumbstick input.
Definition at line 152 of file XrInputHandler.h.
References leftThumbstick_.
| XrSpace Input::XrInputHandler::getRightHandSpace | ( | ) |
Definition at line 318 of file XrInputHandler.cpp.
References getHandPoseInfo(), Input::RIGHT, and Input::HandPoseInfo::space.
|
inlinenodiscard |
Gets the right thumbstick input for XZ plane movement.
Definition at line 146 of file XrInputHandler.h.
References rightThumbstick_.
|
nodiscard |
Gets the trigger value for the specified hand (0.0 to 1.0)
Definition at line 328 of file XrInputHandler.cpp.
References triggerValues_.
| void Input::XrInputHandler::syncInputs | ( | XrSpace | playerSpace, |
| XrTime | predictedDisplayTime ) |
Definition at line 229 of file XrInputHandler.cpp.
References aimPoseAction, defaultActionSet, gripAction_, gripValues_, Input::HandPoseInfo::handPath, Input::HandPoseInfo::handPose, handPoseInfos, headset, Input::LEFT, leftThumbstick_, Input::HandPoseInfo::matrix, EngineCore::OpenXrHelper::poseToMatrix(), rightThumbstick_, Input::HandPoseInfo::space, thumbstickAction_, triggerAction_, triggerValues_, and EngineCore::OpenXrHelper::xrPosefToGlmPosef().
|
private |
Definition at line 170 of file XrInputHandler.h.
Referenced by syncInputs(), and XrInputHandler().
|
private |
Definition at line 171 of file XrInputHandler.h.
|
private |
Definition at line 189 of file XrInputHandler.h.
Referenced by XrInputHandler().
|
private |
Definition at line 167 of file XrInputHandler.h.
Referenced by syncInputs(), and XrInputHandler().
|
private |
Definition at line 186 of file XrInputHandler.h.
Referenced by XrInputHandler().
|
private |
Definition at line 178 of file XrInputHandler.h.
Referenced by syncInputs(), and XrInputHandler().
|
private |
Definition at line 184 of file XrInputHandler.h.
Referenced by getGripValue(), and syncInputs().
|
private |
Definition at line 168 of file XrInputHandler.h.
Referenced by XrInputHandler().
| std::vector<HandPoseInfo> Input::XrInputHandler::handPoseInfos |
Definition at line 164 of file XrInputHandler.h.
Referenced by getHandPoseInfo(), syncInputs(), and XrInputHandler().
|
private |
Definition at line 188 of file XrInputHandler.h.
Referenced by syncInputs(), and XrInputHandler().
|
private |
Definition at line 182 of file XrInputHandler.h.
Referenced by getLeftThumbstick(), and syncInputs().
|
private |
Definition at line 181 of file XrInputHandler.h.
Referenced by getRightThumbstick(), and syncInputs().
|
private |
Definition at line 174 of file XrInputHandler.h.
Referenced by syncInputs(), and XrInputHandler().
|
private |
Definition at line 177 of file XrInputHandler.h.
Referenced by syncInputs(), and XrInputHandler().
|
private |
Definition at line 183 of file XrInputHandler.h.
Referenced by getTriggerValue(), and syncInputs().