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

#include <CUTouchscreen.h>

Public Member Functions

 TouchEvent ()
 
 TouchEvent (TouchID finger, const Vec2 &point, float force, const Timestamp &stamp)
 

Public Attributes

Timestamp timestamp
 
TouchID touch
 
Vec2 position
 
float pressure
 

Detailed Description

This simple class is a struct to hold touch event information.

Constructor & Destructor Documentation

cugl::TouchEvent::TouchEvent ( )
inline

Constructs a new touch event with the default values

cugl::TouchEvent::TouchEvent ( TouchID  finger,
const Vec2 point,
float  force,
const Timestamp stamp 
)
inline

Constructs a new touch event with the given values

Parameters
fingerThe finger generating this event
pointThe current touch position
forceThe current touch pressure
stampThe timestamp for the event

Member Data Documentation

Vec2 cugl::TouchEvent::position

The current touch position in screen coordinates

float cugl::TouchEvent::pressure

The current touch pressure (this is a normalized value 0..1)

Timestamp cugl::TouchEvent::timestamp

The time of the touch event

TouchID cugl::TouchEvent::touch

The associated finger for this touch event


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