CUGL 2.0
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

◆ TouchEvent() [1/2]

cugl::TouchEvent::TouchEvent ( )
inline

Constructs a new touch event with the default values

◆ TouchEvent() [2/2]

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

◆ position

Vec2 cugl::TouchEvent::position

The current touch position in screen coordinates

◆ pressure

float cugl::TouchEvent::pressure

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

◆ timestamp

Timestamp cugl::TouchEvent::timestamp

The time of the touch event

◆ touch

TouchID cugl::TouchEvent::touch

The associated finger for this touch event


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