Murl::IGameControllerMapping Interface Referenceabstract

The game controller mapping interface. More...

#include "murl_i_game_controller_mapping.h"

Inherited by Murl::Input::GameControllerMapping.

Classes

class  AxisMapping
 The raw axis mapping. More...
 
class  AxisRawData
 The raw axis data. More...
 
class  ButtonMapping
 The button mapping. More...
 
class  DeviceInfo
 Device information data. More...
 
class  PovMapping
 The point of view mapping. More...
 
class  RawData
 The game controller raw data. More...
 
class  RawMapping
 The game controller mapping data. More...
 

Public Types

enum  AxisType {
  AXIS_X , AXIS_Y , AXIS_Z , AXIS_RX ,
  AXIS_RY , AXIS_RZ
}
 Definition of raw data axis types. More...
 
enum  AxisEvent {
  AXIS_EVENT_NONE , AXIS_EVENT_LEFT_STICK_X , AXIS_EVENT_LEFT_STICK_Y , AXIS_EVENT_RIGHT_STICK_X ,
  AXIS_EVENT_RIGHT_STICK_Y , AXIS_EVENT_L1_BUTTON , AXIS_EVENT_R1_BUTTON , AXIS_EVENT_L2_BUTTON ,
  AXIS_EVENT_R2_BUTTON , NUM_AXIS_EVENTS
}
 Definition of axis events. More...
 
using AxisRawDataArray = SharedArray< AxisRawData >
 Definition of an array holding AxisRawData values.
 
using AxisMappingArray = SharedArray< AxisMapping >
 Definition of an array holding AxisMapping values.
 
using ButtonMappingArray = SharedArray< ButtonMapping >
 Definition of an array holding ButtonMapping values.
 
using PovMappingArray = SharedArray< PovMapping >
 Definition of an array holding PovMapping values.
 

Public Member Functions

virtual Bool GetRawData (RawData &rawData) const =0
 Get the current raw data. More...
 
virtual Bool SetRawData (const RawData &rawData)=0
 Set the current raw data. More...
 
virtual Bool GetRawMapping (RawMapping &rawMapping) const =0
 Get the mapping data. More...
 
virtual Bool SetRawMapping (const RawMapping &rawMapping)=0
 Set the mapping data. More...
 

Detailed Description

The game controller mapping interface.

The IGameControllerMapping interface can be accessed by the Logic::IDeviceHandler::GetGameControllerMapping() method or the Input::IGameControllerDevice::GetMapping() method.
The RawData is supplied directly from the controller device and can be used to create an interactive mapping setup.
Use GetRawData() to determine the raw data on the game controller, afterwards use SetRawMapping() to setup a corresponding mapping.
Use Logic::IDeviceHandler::GetGameControllerDeviceInfo() or Input::IGameControllerDevice::GetDeviceInfo() to identify the controller.

Member Enumeration Documentation

◆ AxisType

Definition of raw data axis types.

Enumerator
AXIS_X 

The raw data's x-axis.

AXIS_Y 

The raw data's y-axis.

AXIS_Z 

The raw data's z-axis.

AXIS_RX 

The raw data's right x-axis.

AXIS_RY 

The raw data's right y-axis.

AXIS_RZ 

The raw data's right z-axis.

◆ AxisEvent

Definition of axis events.

Enumerator
AXIS_EVENT_NONE 

No axis.

AXIS_EVENT_LEFT_STICK_X 

Left stick x-axis.

The range is [-1.0 left .. 1.0 right]

AXIS_EVENT_LEFT_STICK_Y 

Left stick y-axis.

The range is [-1.0 bottom .. 1.0 top]

AXIS_EVENT_RIGHT_STICK_X 

Right stick x-axis.

The range is [-1.0 left .. 1.0 right]

AXIS_EVENT_RIGHT_STICK_Y 

Right stick y-axis.

The range is [-1.0 bottom .. 1.0 top]

AXIS_EVENT_L1_BUTTON 

Left shoulder button (1st row) value.

The range is [0.0 not pressed .. 1.0 full pressed].

AXIS_EVENT_R1_BUTTON 

Right shoulder button (1st row) value.

The range is [0.0 not pressed .. 1.0 full pressed].

AXIS_EVENT_L2_BUTTON 

Left shoulder button (2nd row) value.

The range is [0.0 not pressed .. 1.0 full pressed].

AXIS_EVENT_R2_BUTTON 

Right shoulder button (2nd row) value.

The range is [0.0 not pressed .. 1.0 full pressed].

Member Function Documentation

◆ GetRawData()

virtual Bool Murl::IGameControllerMapping::GetRawData ( RawData rawData) const
pure virtual

Get the current raw data.

Parameters
rawDataThe raw data return value.
Returns
true if successful.

◆ SetRawData()

virtual Bool Murl::IGameControllerMapping::SetRawData ( const RawData rawData)
pure virtual

Set the current raw data.

Automatically posts the game controller's events based on the raw data and mapping.
This is typically used by the device implementation only.

Parameters
rawDataThe raw data to set.
Returns
true if successful.

◆ GetRawMapping()

virtual Bool Murl::IGameControllerMapping::GetRawMapping ( RawMapping rawMapping) const
pure virtual

Get the mapping data.

Parameters
rawMappingThe mapping data return value.
Returns
true if successful.

◆ SetRawMapping()

virtual Bool Murl::IGameControllerMapping::SetRawMapping ( const RawMapping rawMapping)
pure virtual

Set the mapping data.

Automatically sets the game controller's available controls based on the raw mapping.

Parameters
rawMappingThe mapping data to set.
Returns
true if successful.

The documentation for this interface was generated from the following file:
  • murl_i_game_controller_mapping.h


Copyright © 2011-2024 Spraylight GmbH.