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

#include <CUPinchGesture.h>

Public Member Functions

 PinchEvent ()
 
 PinchEvent (const Timestamp &stamp, const Vec2 anchor, float distance)
 
 PinchEvent (const PinchEvent &event)
 
void clear ()
 

Public Attributes

Timestamp start
 
Timestamp now
 
Vec2 anchor
 
float origSpread
 
float currSpread
 
float delta
 

Detailed Description

This simple class is a struct to hold a pinch event.

A pinch event is a gesture with duration. Hence this event stores information about the start of the event, as well as the current status of the event.

Constructor & Destructor Documentation

◆ PinchEvent() [1/3]

cugl::PinchEvent::PinchEvent ( )
inline

Constructs a new touch event with the default values

◆ PinchEvent() [2/3]

cugl::PinchEvent::PinchEvent ( const Timestamp stamp,
const Vec2  anchor,
float  distance 
)
inline

Constructs a new pinch event with the given values

Parameters
stampThe timestamp for the event
anchorThe normalized pinch center
distanceThe distance between the two fingers

◆ PinchEvent() [3/3]

cugl::PinchEvent::PinchEvent ( const PinchEvent event)
inline

Constructs a new pinch event that is a copy of the given one

Parameters
eventThe event to copy

Member Function Documentation

◆ clear()

void cugl::PinchEvent::clear ( )
inline

Clears the contents of this pinch event

Member Data Documentation

◆ anchor

Vec2 cugl::PinchEvent::anchor

The normalized center of this pinch

◆ currSpread

float cugl::PinchEvent::currSpread

The current finger separation of the gesture

◆ delta

float cugl::PinchEvent::delta

The pinch delta since the last animation frame

◆ now

Timestamp cugl::PinchEvent::now

The current time of the gesture

◆ origSpread

float cugl::PinchEvent::origSpread

The initial finger separation of the gesture

◆ start

Timestamp cugl::PinchEvent::start

The starting time of the gesture


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