Open 3D Engine VirtualGamepad Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
VirtualGamepad::InputDeviceVirtualGamepad Class Reference

Implementation for a virtual gamepad input device that is controlled using a touch screen. More...

#include <InputDeviceVirtualGamepad.h>

Inherits AzFramework::InputDevice.

Public Member Functions

 AZ_CLASS_ALLOCATOR (InputDeviceVirtualGamepad, AZ::SystemAllocator)
 
 AZ_RTTI (InputDeviceVirtualGamepad, "{DC4B939E-66C7-4F76-B7DF-049A3F13A1C3}", InputDevice)
 
 InputDeviceVirtualGamepad (const AZStd::unordered_set< AZStd::string > &buttonNames, const AZStd::unordered_set< AZStd::string > &thumbStickNames)
 
 ~InputDeviceVirtualGamepad () override
 Destructor.
 
const InputChannelByIdMap & GetInputChannelsById () const override
 AzFramework::InputDevice::GetInputChannelsById
 
bool IsSupported () const override
 AzFramework::InputDevice::IsSupported
 
bool IsConnected () const override
 AzFramework::InputDevice::IsConnected
 
void TickInputDevice () override
 AzFramework::InputDeviceRequests::TickInputDevice
 

Static Public Member Functions

static bool IsVirtualGamepadDevice (const AzFramework::InputDeviceId &inputDeviceId)
 

Static Public Attributes

static const AzFramework::InputDeviceId Id
 The id used to identify the primary virtual gamepad input device.
 

Protected Member Functions

void CreateButtonChannel (const AZStd::string &channelName)
 
void CreateThumbStickAxis1DChannel (const AZStd::string &channelName)
 
void CreateThumbStickAxis2DChannel (const AZStd::string &channelName)
 
void CreateThumbStickDirectionChannel (const AZStd::string &channelName)
 

Detailed Description

Implementation for a virtual gamepad input device that is controlled using a touch screen.

Constructor & Destructor Documentation

◆ InputDeviceVirtualGamepad()

VirtualGamepad::InputDeviceVirtualGamepad::InputDeviceVirtualGamepad ( const AZStd::unordered_set< AZStd::string > &  buttonNames,
const AZStd::unordered_set< AZStd::string > &  thumbStickNames 
)
explicit

Constructor

Parameters
[in]buttonNamesThe list of button names supported by the virtual gamepad
[in]thumbStickNamesThe list of thumbstick names supported by the virtual gamepad

Member Function Documentation

◆ CreateButtonChannel()

void VirtualGamepad::InputDeviceVirtualGamepad::CreateButtonChannel ( const AZStd::string &  channelName)
protected

Create a button input channel

Parameters
[in]channelNameThe input channel name

◆ CreateThumbStickAxis1DChannel()

void VirtualGamepad::InputDeviceVirtualGamepad::CreateThumbStickAxis1DChannel ( const AZStd::string &  channelName)
protected

Create a thumb-stick axis 1D input channel

Parameters
[in]channelNameThe input channel name

◆ CreateThumbStickAxis2DChannel()

void VirtualGamepad::InputDeviceVirtualGamepad::CreateThumbStickAxis2DChannel ( const AZStd::string &  channelName)
protected

Create a thumb-stick axis 2D input channel

Parameters
[in]channelNameThe input channel name

◆ CreateThumbStickDirectionChannel()

void VirtualGamepad::InputDeviceVirtualGamepad::CreateThumbStickDirectionChannel ( const AZStd::string &  channelName)
protected

Create a thumb-stick direction input channel

Parameters
[in]channelNameThe input channel name

◆ IsVirtualGamepadDevice()

static bool VirtualGamepad::InputDeviceVirtualGamepad::IsVirtualGamepadDevice ( const AzFramework::InputDeviceId &  inputDeviceId)
static

Check whether an input device id identifies a virtual gamepad (regardless of index)

Parameters
[in]inputDeviceIdThe input device id to check
Returns
True if the input device id identifies a virtual gamepad, false otherwise

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