CUGL 3.0
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, GameController::Axis index, float pos, const Timestamp &stamp)
 

Public Attributes

Timestamp timestamp
 
std::string uuid
 
GameController::Axis axis
 
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,
GameController::Axis  index,
float  pos,
const Timestamp stamp 
)
inline

Constructs a new axis event with the given values

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

Member Data Documentation

◆ axis

GameController::Axis cugl::GameControllerAxisEvent::axis

The axis reference

◆ 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: