CUGL
Cornell University Game Library
Public Member Functions | Public Attributes | List of all members
cugl::GestureEvent Class Reference

#include <CUGestureInput.h>

Public Member Functions

 GestureEvent ()
 
 GestureEvent (const std::string &name, float delta, int down, const Timestamp &stamp)
 

Public Attributes

Timestamp timestamp
 
std::string key
 
float error
 
int fingers
 

Detailed Description

This simple class is a struct to hold custom gesture event information.

Constructor & Destructor Documentation

cugl::GestureEvent::GestureEvent ( )
inline

Constructs a new gesture event with the default values

cugl::GestureEvent::GestureEvent ( const std::string &  name,
float  delta,
int  down,
const Timestamp stamp 
)
inline

Constructs a new gesture event with the given values

Parameters
nameThe identifying gesture key
downThe number of fingers in the gesture
deltaThe delta between the template and the actual performed gesture
stampThe timestamp for the event

Member Data Documentation

float cugl::GestureEvent::error

The delta between the template and the actual performed gesture.

Errors are normalized to be between 0 and 1, with 0 being accurate and 1 being an extreme error. However, errors greater than 1 are possible because of the normalization process.

int cugl::GestureEvent::fingers

The number of fingers involved in this pan

std::string cugl::GestureEvent::key

Identifier key for this gesture

Timestamp cugl::GestureEvent::timestamp

The time of the gesture event


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