XII Release 0.1.0
Loading...
Searching...
No Matches
xiiDummyXRInput Class Reference
Inheritance diagram for xiiDummyXRInput:
[legend]

Public Member Functions

void GetDeviceList (xiiHybridArray< xiiXRDeviceID, 64 > &out_devices) const override
 Fills out a list of valid (connected) device IDs.
 
xiiXRDeviceID GetDeviceIDByType (xiiXRDeviceType::Enum type) const override
 Returns the deviceID for a specific type of device. If the device is not connected, -1 is returned instead.
 
const xiiXRDeviceStateGetDeviceState (xiiXRDeviceID deviceID) const override
 Returns the current device state for a valid device ID.
 
xiiString GetDeviceName (xiiXRDeviceID deviceID) const override
 Returns the device name for a valid device ID.
 
xiiBitflags< xiiXRDeviceFeaturesGetDeviceFeatures (xiiXRDeviceID deviceID) const override
 Returns the device features for a valid device ID.
 
- Public Member Functions inherited from xiiXRInputDevice
const xiiXRDeviceEventGetInputEvent ()
 Returns the input event. Allows tracking device addition and removal.
 
- Public Member Functions inherited from xiiInputDevice
 xiiInputDevice ()
 Default Constructor.
 
float GetInputSlotState (xiiStringView 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.
 
- Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Protected Member Functions

void InitializeDevice () override
 Override this if you need to do device specific initialization before the first use.
 
void UpdateInputSlotValues () override
 Override this, if you need to query the state of the hardware to update the input slots.
 
void RegisterInputSlots () override
 Override this to register all the input slots that this device exposes.
 
- Protected Member Functions inherited from xiiInputDevice
virtual void ResetInputSlotValues ()
 Override this, if you need to reset certain input slot values to zero, after the xiiInputManager is finished with the current frame update.
 
virtual void UpdateHardwareState (xiiTime tTimeDifference)
 This function is called once after xiiInputManager::Update with the same time delta value. It allows to update hardware state, such as the vibration of gamepad motors.
 

Protected Attributes

xiiXRDeviceState m_DeviceState [1]
 
- Protected Attributes inherited from xiiXRInputDevice
xiiXRDeviceEvent m_InputEvents
 
- Protected Attributes inherited from xiiInputDevice
xiiMap< xiiString, float > m_InputSlotValues
 Stores all the values for all input slots that this device handles.
 
xiiUInt32 m_uiLastCharacter
 If this input device type handles character input, it should write the last typed character into this variable. The xiiInputManager calls RetrieveLastCharacter() to query what the user typed last.
 
- Protected Attributes inherited from xiiEnumerable< xiiInputDevice, xiiReflectedClass >
xiiEnumerablem_pNextInstance
 

Friends

class xiiDummyXR
 

Additional Inherited Members

- Static Public Member Functions inherited from xiiNoBase
static const xiiRTTIGetStaticRTTI ()
 
- Static Protected Member Functions inherited from xiiInputDevice
static void RegisterInputSlot (xiiStringView sName, xiiStringView sDefaultDisplayName, xiiBitflags< xiiInputSlotFlags > SlotFlags)
 Calls RegisterInputSlot() on the xiiInputManager and passes the parameters through.
 

Member Function Documentation

◆ GetDeviceFeatures()

xiiBitflags< xiiXRDeviceFeatures > xiiDummyXRInput::GetDeviceFeatures ( xiiXRDeviceID deviceID) const
overridevirtual

Returns the device features for a valid device ID.

Implements xiiXRInputDevice.

◆ GetDeviceIDByType()

xiiXRDeviceID xiiDummyXRInput::GetDeviceIDByType ( xiiXRDeviceType::Enum type) const
overridevirtual

Returns the deviceID for a specific type of device. If the device is not connected, -1 is returned instead.

Implements xiiXRInputDevice.

◆ GetDeviceList()

void xiiDummyXRInput::GetDeviceList ( xiiHybridArray< xiiXRDeviceID, 64 > & out_devices) const
overridevirtual

Fills out a list of valid (connected) device IDs.

Implements xiiXRInputDevice.

◆ GetDeviceName()

xiiString xiiDummyXRInput::GetDeviceName ( xiiXRDeviceID deviceID) const
overridevirtual

Returns the device name for a valid device ID.

This returns a human readable name to identify the device. For xiiXRDeviceType::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 xiiXRInputDevice.

◆ GetDeviceState()

const xiiXRDeviceState & xiiDummyXRInput::GetDeviceState ( xiiXRDeviceID deviceID) const
overridevirtual

Returns the current device state for a valid device ID.

Implements xiiXRInputDevice.

◆ InitializeDevice()

void xiiDummyXRInput::InitializeDevice ( )
overrideprotectedvirtual

Override this if you need to do device specific initialization before the first use.

Implements xiiInputDevice.

◆ RegisterInputSlots()

void xiiDummyXRInput::RegisterInputSlots ( )
overrideprotectedvirtual

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 xiiInputDevice.

◆ UpdateInputSlotValues()

void xiiDummyXRInput::UpdateInputSlotValues ( )
overrideprotectedvirtual

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 xiiInputManager::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 xiiInputDevice.


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