CUGL 2.1
Cornell University Game Library
|
#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 |
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.
|
inline |
Constructs a new touch event with the default values
Constructs a new pinch event with the given values
stamp | The timestamp for the event |
anchor | The normalized pinch center |
distance | The distance between the two fingers |
|
inline |
Constructs a new pinch event that is a copy of the given one
event | The event to copy |
|
inline |
Clears the contents of this pinch event
Vec2 cugl::PinchEvent::anchor |
The normalized center of this pinch
float cugl::PinchEvent::currSpread |
The current finger separation of the gesture
float cugl::PinchEvent::delta |
The pinch delta since the last animation frame
Timestamp cugl::PinchEvent::now |
The current time of the gesture
float cugl::PinchEvent::origSpread |
The initial finger separation of the gesture
Timestamp cugl::PinchEvent::start |
The starting time of the gesture