Plasma Engine  2.0
Loading...
Searching...
No Matches
XRInputDevice.h
1#pragma once
2
3#include <Core/Input/InputDevice.h>
4#include <Foundation/Reflection/Reflection.h>
5#include <GameEngine/GameEngineDLL.h>
6#include <GameEngine/XR/Declarations.h>
7
8#define plInputSlot_XR_Hand_Left_Trigger "xr_hand_left_trigger"
9#define plInputSlot_XR_Hand_Left_Select_Click "xr_hand_left_select_click"
10#define plInputSlot_XR_Hand_Left_Menu_Click "xr_hand_left_menu_click"
11#define plInputSlot_XR_Hand_Left_Squeple_Click "xr_hand_left_squeple_click"
12
13#define plInputSlot_XR_Hand_Left_Primary_Analog_Stick_NegX "xr_hand_left_primary_analog_stick_negx"
14#define plInputSlot_XR_Hand_Left_Primary_Analog_Stick_PosX "xr_hand_left_primary_analog_stick_posx"
15#define plInputSlot_XR_Hand_Left_Primary_Analog_Stick_NegY "xr_hand_left_primary_analog_stick_negy"
16#define plInputSlot_XR_Hand_Left_Primary_Analog_Stick_PosY "xr_hand_left_primary_analog_stick_posy"
17#define plInputSlot_XR_Hand_Left_Primary_Analog_Stick_Click "xr_hand_left_primary_analog_stick_click"
18#define plInputSlot_XR_Hand_Left_Primary_Analog_Stick_Touch "xr_hand_left_primary_analog_stick_touch"
19
20#define plInputSlot_XR_Hand_Left_Secondary_Analog_Stick_NegX "xr_hand_left_secondary_analog_stick_negx"
21#define plInputSlot_XR_Hand_Left_Secondary_Analog_Stick_PosX "xr_hand_left_secondary_analog_stick_posx"
22#define plInputSlot_XR_Hand_Left_Secondary_Analog_Stick_NegY "xr_hand_left_secondary_analog_stick_negy"
23#define plInputSlot_XR_Hand_Left_Secondary_Analog_Stick_PosY "xr_hand_left_secondary_analog_stick_posy"
24#define plInputSlot_XR_Hand_Left_Secondary_Analog_Stick_Click "xr_hand_left_secondary_analog_stick_click"
25#define plInputSlot_XR_Hand_Left_Secondary_Analog_Stick_Touch "xr_hand_left_secondary_analog_stick_touch"
26
27
28#define plInputSlot_XR_Hand_Right_Trigger "xr_hand_right_trigger"
29#define plInputSlot_XR_Hand_Right_Select_Click "xr_hand_right_select_click"
30#define plInputSlot_XR_Hand_Right_Menu_Click "xr_hand_right_menu_click"
31#define plInputSlot_XR_Hand_Right_Squeple_Click "xr_hand_right_squeple_click"
32
33#define plInputSlot_XR_Hand_Right_Primary_Analog_Stick_NegX "xr_hand_right_primary_analog_stick_negx"
34#define plInputSlot_XR_Hand_Right_Primary_Analog_Stick_PosX "xr_hand_right_primary_analog_stick_posx"
35#define plInputSlot_XR_Hand_Right_Primary_Analog_Stick_NegY "xr_hand_right_primary_analog_stick_negy"
36#define plInputSlot_XR_Hand_Right_Primary_Analog_Stick_PosY "xr_hand_right_primary_analog_stick_posy"
37#define plInputSlot_XR_Hand_Right_Primary_Analog_Stick_Click "xr_hand_right_primary_analog_stick_click"
38#define plInputSlot_XR_Hand_Right_Primary_Analog_Stick_Touch "xr_hand_right_primary_analog_stick_touch"
39
40#define plInputSlot_XR_Hand_Right_Secondary_Analog_Stick_NegX "xr_hand_right_secondary_analog_stick_negx"
41#define plInputSlot_XR_Hand_Right_Secondary_Analog_Stick_PosX "xr_hand_right_secondary_analog_stick_posx"
42#define plInputSlot_XR_Hand_Right_Secondary_Analog_Stick_NegY "xr_hand_right_secondary_analog_stick_negy"
43#define plInputSlot_XR_Hand_Right_Secondary_Analog_Stick_PosY "xr_hand_right_secondary_analog_stick_posy"
44#define plInputSlot_XR_Hand_Right_Secondary_Analog_Stick_Click "xr_hand_right_secondary_analog_stick_click"
45#define plInputSlot_XR_Hand_Right_Secondary_Analog_Stick_Touch "xr_hand_right_secondary_analog_stick_touch"
46
47
48class PL_GAMEENGINE_DLL plXRInputDevice : public plInputDevice
49{
50 PL_ADD_DYNAMIC_REFLECTION(plXRInputDevice, plInputDevice);
51
52public:
55
57 virtual void GetDeviceList(plHybridArray<plXRDeviceID, 64>& out_devices) const = 0;
60 virtual plXRDeviceID GetDeviceIDByType(plXRDeviceType::Enum type) const = 0;
62 virtual const plXRDeviceState& GetDeviceState(plXRDeviceID deviceID) const = 0;
71 virtual plString GetDeviceName(plXRDeviceID deviceID) const = 0;
73 virtual plBitflags<plXRDeviceFeatures> GetDeviceFeatures(plXRDeviceID deviceID) const = 0;
74
76 const plXRDeviceEvent& GetInputEvent() { return m_InputEvents; }
77
79
80protected:
81 plXRDeviceEvent m_InputEvents;
82};
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
The base class for all input device types.
Definition InputDevice.h:41
Definition XRInputDevice.h:49
virtual void GetDeviceList(plHybridArray< plXRDeviceID, 64 > &out_devices) const =0
Fills out a list of valid (connected) device IDs.
virtual plString GetDeviceName(plXRDeviceID deviceID) const =0
Returns the device name for a valid device ID.
const plXRDeviceEvent & GetInputEvent()
Returns the input event. Allows tracking device addition and removal.
Definition XRInputDevice.h:76
virtual const plXRDeviceState & GetDeviceState(plXRDeviceID deviceID) const =0
Returns the current device state for a valid device ID.
virtual plBitflags< plXRDeviceFeatures > GetDeviceFeatures(plXRDeviceID deviceID) const =0
Returns the device features for a valid device ID.
virtual plXRDeviceID GetDeviceIDByType(plXRDeviceType::Enum type) const =0
Returns the deviceID for a specific type of device. If the device is not connected,...
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
A device's pose state.
Definition Declarations.h:80