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

#include <CUGameController.h>

Public Member Functions

 GameControllerBallEvent ()
 
 GameControllerBallEvent (const std::string key, Uint8 ind, float dx, float dy, const Timestamp &stamp)
 

Public Attributes

Timestamp timestamp
 
std::string uuid
 
Uint8 index
 
Vec2 offset
 

Detailed Description

This simple class is a struct to hold information about track ball movement

All track ball movement is relative. Unlike the other input devices there is no absolute state for a track ball. As such this even will be continuously generated as long as a track ball is moving, and will not fire when it is still.

Constructor & Destructor Documentation

◆ GameControllerBallEvent() [1/2]

cugl::GameControllerBallEvent::GameControllerBallEvent ( )
inline

Constructs a new track ball event with the default values

◆ GameControllerBallEvent() [2/2]

cugl::GameControllerBallEvent::GameControllerBallEvent ( const std::string  key,
Uint8  ind,
float  dx,
float  dy,
const Timestamp stamp 
)
inline

Constructs a new track ball event with the given values

Parameters
keyThe device UID
indThe track ball index
dxThe change in x position
dyThe change in y position
stampThe timestamp for the event

Member Data Documentation

◆ index

Uint8 cugl::GameControllerBallEvent::index

The track ball index

◆ offset

Vec2 cugl::GameControllerBallEvent::offset

The relative change in the track ball position

◆ timestamp

Timestamp cugl::GameControllerBallEvent::timestamp

The time of the input event

◆ uuid

std::string cugl::GameControllerBallEvent::uuid

The UID of the relevant device


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