|
void | GetDeviceList (plHybridArray< plXRDeviceID, 64 > &out_devices) const override |
| Fills out a list of valid (connected) device IDs.
|
|
plXRDeviceID | GetDeviceIDByType (plXRDeviceType::Enum type) const override |
| Returns the deviceID for a specific type of device. If the device is not connected, -1 is returned instead.
|
|
const plXRDeviceState & | GetDeviceState (plXRDeviceID deviceID) const override |
| Returns the current device state for a valid device ID.
|
|
plString | GetDeviceName (plXRDeviceID deviceID) const override |
| Returns the device name for a valid device ID.
|
|
plBitflags< plXRDeviceFeatures > | GetDeviceFeatures (plXRDeviceID deviceID) const override |
| Returns the device features for a valid device ID.
|
|
const plXRDeviceEvent & | GetInputEvent () |
| Returns the input event. Allows tracking device addition and removal.
|
|
| plInputDevice () |
| Default Constructor.
|
|
float | GetInputSlotState (plStringView sSlot) const |
| Allows to query current input values for the given slot.
|
|
bool | HasDeviceBeenUsedLastFrame () const |
| Returns true, if the device was 'used' during the last frame, ie. when it generated input due to some user interaction.
|
|
virtual const plRTTI * | GetDynamicRTTI () const |
|
bool | IsInstanceOf (const plRTTI *pType) const |
| Returns whether the type of this instance is of the given type or derived from it.
|
|
template<typename T > |
PL_ALWAYS_INLINE bool | IsInstanceOf () const |
| Returns whether the type of this instance is of the given type or derived from it.
|
|
|
void | InitializeDevice () override |
| Override this if you need to do device specific initialization before the first use.
|
|
void | RegisterInputSlots () override |
| Override this to register all the input slots that this device exposes.
|
|
void | UpdateInputSlotValues () override |
| Override this, if you need to query the state of the hardware to update the input slots.
|
|
◆ GetDeviceFeatures()
Returns the device features for a valid device ID.
Implements plXRInputDevice.
◆ GetDeviceIDByType()
plXRDeviceID plOpenXRInputDevice::GetDeviceIDByType |
( |
plXRDeviceType::Enum | type | ) |
const |
|
overridevirtual |
Returns the deviceID for a specific type of device. If the device is not connected, -1 is returned instead.
Implements plXRInputDevice.
◆ GetDeviceList()
void plOpenXRInputDevice::GetDeviceList |
( |
plHybridArray< plXRDeviceID, 64 > & | out_devices | ) |
const |
|
overridevirtual |
Fills out a list of valid (connected) device IDs.
Implements plXRInputDevice.
◆ GetDeviceName()
plString plOpenXRInputDevice::GetDeviceName |
( |
plXRDeviceID | deviceID | ) |
const |
|
overridevirtual |
Returns the device name for a valid device ID.
This returns a human readable name to identify the device. For plXRDeviceType::HMD the name is always 'HMD'. This can be used for e.g. controllers to create custom game input logic or mappings if a certain type of controller is used. Values could be for example: 'Simple Controller', 'Mixed Reality Motion Controller', 'Hand Interaction' etc.
Implements plXRInputDevice.
◆ GetDeviceState()
const plXRDeviceState & plOpenXRInputDevice::GetDeviceState |
( |
plXRDeviceID | deviceID | ) |
const |
|
overridevirtual |
Returns the current device state for a valid device ID.
Implements plXRInputDevice.
◆ InitializeDevice()
void plOpenXRInputDevice::InitializeDevice |
( |
| ) |
|
|
overrideprivatevirtual |
Override this if you need to do device specific initialization before the first use.
Implements plInputDevice.
◆ RegisterInputSlots()
void plOpenXRInputDevice::RegisterInputSlots |
( |
| ) |
|
|
overrideprivatevirtual |
Override this to register all the input slots that this device exposes.
This is called once during initialization. It needs to call RegisterInputSlot() once for every input slot that this device exposes to the system.
Implements plInputDevice.
◆ UpdateInputSlotValues()
void plOpenXRInputDevice::UpdateInputSlotValues |
( |
| ) |
|
|
inlineoverrideprivatevirtual |
Override this, if you need to query the state of the hardware to update the input slots.
- Note
- This function might be called multiple times before ResetInputSlotValues() is called. This will be the case when plInputManager::PollHardware is used to make more frequent hardware updates than input is actually processed. Just make sure to always accumulate delta values (such as mouse move values) and don't expect ResetInputSlotValues() to be called in tandem with this function and it will be fine.
Implements plInputDevice.
The documentation for this class was generated from the following files:
- Code/EnginePlugins/OpenXRPlugin/OpenXRInputDevice.h
- Code/EnginePlugins/OpenXRPlugin/OpenXRInputDevice.cpp