CUGL 2.5
Cornell University Game Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
cugl::GameControllerAxisEvent Class Reference

#include <CUGameController.h>

Public Member Functions

 GameControllerAxisEvent ()
 
 GameControllerAxisEvent (const std::string key, Uint8 ind, float pos, const Timestamp &stamp)
 

Public Attributes

Timestamp timestamp
 
std::string uuid
 
Uint8 index
 
float value
 

Detailed Description

This simple class is a struct to hold information about an axis movement.

This event is generated when an axis changes position. Remember that analogue joysticks are composed of two axes, and thuse will have two events associated with them.

Constructor & Destructor Documentation

◆ GameControllerAxisEvent() [1/2]

cugl::GameControllerAxisEvent::GameControllerAxisEvent ( )
inline

Constructs a new axis event with the default values

◆ GameControllerAxisEvent() [2/2]

cugl::GameControllerAxisEvent::GameControllerAxisEvent ( const std::string  key,
Uint8  ind,
float  pos,
const Timestamp stamp 
)
inline

Constructs a new axis event with the given values

Parameters
keyThe device UID
indThe axis index
posThe axis position in [-1,1]
stampThe timestamp for the event

Member Data Documentation

◆ index

Uint8 cugl::GameControllerAxisEvent::index

The axis index

◆ timestamp

Timestamp cugl::GameControllerAxisEvent::timestamp

The time of the input event

◆ uuid

std::string cugl::GameControllerAxisEvent::uuid

The UID of the relevant device

◆ value

float cugl::GameControllerAxisEvent::value

The value in the range [-1,1]


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