NAP
Public Member Functions | Public Attributes | List of all members
ControllerAxisEvent Class Reference

#include <inputevent.h>

Public Member Functions

 ControllerAxisEvent (int deviceID, EControllerAxis axis, int axisID, double value)
 
- Public Member Functions inherited from ControllerEvent
 ControllerEvent (int deviceID)
 
- Public Member Functions inherited from Event
virtual ~Event ()=default
 
 Event ()=default
 
 Event (const Event &)=delete
 
Eventoperator= (const Event &)=delete
 

Public Attributes

EControllerAxis mAxis = EControllerAxis::UNKNOWN
 Mapped axis, unknown when no mapping is provided. More...
 
int mAxisID = -1
 Hardware axis id, available when no button mapping is provided (UNKNOWN) More...
 
double mValue = 0.0
 Axis value ranging from -1.0, 1.0. More...
 
- Public Attributes inherited from ControllerEvent
int mDeviceID = -1
 Hardware device if of controller. More...
 

Description

Defines a controller axis event. This event is created when an axis on a game controller or joystick changes. Use the 'mAxis' variable to retrieve the mapped axis id, ie: LEFT_X or TRIGGER_RIGHT If there is no mapping available the 'mAxis' variable is unknown, in that case you need to interpret the hardware id stored in 'mAxisID' yourself

Inheritance diagram for ControllerAxisEvent:
[legend]
Collaboration diagram for ControllerAxisEvent:
[legend]

Constructor & Destructor Documentation

◆ ControllerAxisEvent()

ControllerAxisEvent ( int  deviceID,
EControllerAxis  axis,
int  axisID,
double  value 
)

Member Data Documentation

◆ mAxis

Mapped axis, unknown when no mapping is provided.

◆ mAxisID

int mAxisID = -1

Hardware axis id, available when no button mapping is provided (UNKNOWN)

◆ mValue

double mValue = 0.0

Axis value ranging from -1.0, 1.0.